From 77e654b17af91cf6e9d027e133e68705d8b478c2 Mon Sep 17 00:00:00 2001 From: alicedraillard <85180705+alicedraillard@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:00:31 +0100 Subject: [PATCH] fix(rights): #MAG-513 fix lock rights (#359) --- .../src/components/board-card/useCardDropDownItems.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/board-card/useCardDropDownItems.tsx b/frontend/src/components/board-card/useCardDropDownItems.tsx index 949aabb80..64ffe1e38 100644 --- a/frontend/src/components/board-card/useCardDropDownItems.tsx +++ b/frontend/src/components/board-card/useCardDropDownItems.tsx @@ -114,7 +114,7 @@ export const useCardDropDownItems = ( ); return useMemo(() => { - if (readOnly) { + if (readOnly || (isLocked && !isOwnerOrManager)) { return [menuItems.preview]; } @@ -129,10 +129,6 @@ export const useCardDropDownItems = ( ]; } - if (isLocked) { - return [menuItems.preview, menuItems.duplicate, menuItems.move]; - } - if (hasEditRights) { return [ menuItems.preview, @@ -145,6 +141,7 @@ export const useCardDropDownItems = ( if (hasContribRights) { return [menuItems.preview, menuItems.duplicate]; } + return [menuItems.preview]; }, [ isOwnerOrManager,