Skip to content

Commit

Permalink
fix(rights): #MAG-513 fix lock rights (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicedraillard authored Dec 4, 2024
1 parent ac95d70 commit 77e654b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frontend/src/components/board-card/useCardDropDownItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const useCardDropDownItems = (
);

return useMemo(() => {
if (readOnly) {
if (readOnly || (isLocked && !isOwnerOrManager)) {
return [menuItems.preview];
}

Expand All @@ -129,10 +129,6 @@ export const useCardDropDownItems = (
];
}

if (isLocked) {
return [menuItems.preview, menuItems.duplicate, menuItems.move];
}

if (hasEditRights) {
return [
menuItems.preview,
Expand All @@ -145,6 +141,7 @@ export const useCardDropDownItems = (
if (hasContribRights) {
return [menuItems.preview, menuItems.duplicate];
}

return [menuItems.preview];
}, [
isOwnerOrManager,
Expand Down

0 comments on commit 77e654b

Please sign in to comment.