Skip to content

Commit 12d32fe

Browse files
committed
🛂(frontend) don't show action buttons
Don't show actions buttons if the user doesn't have permission to edit or delete the document.
1 parent 038d868 commit 12d32fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridActions.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export const DocsGridActions = ({ doc }: DocsGridActionsProps) => {
1919
const [isModalRemoveOpen, setIsModalRemoveOpen] = useState(false);
2020
const [isDropOpen, setIsDropOpen] = useState(false);
2121

22+
if (!doc.abilities.partial_update && !doc.abilities.destroy) {
23+
return null;
24+
}
25+
2226
return (
2327
<>
2428
<DropButton

0 commit comments

Comments
 (0)