🛂(frontend) don't show action buttons

Don't show actions buttons if the user
doesn't have permission to edit or delete
the document.
This commit is contained in:
Anthony LC
2024-07-09 18:11:16 +02:00
committed by Anthony LC
parent 038d868d29
commit 12d32fe933

View File

@@ -19,6 +19,10 @@ export const DocsGridActions = ({ doc }: DocsGridActionsProps) => {
const [isModalRemoveOpen, setIsModalRemoveOpen] = useState(false);
const [isDropOpen, setIsDropOpen] = useState(false);
if (!doc.abilities.partial_update && !doc.abilities.destroy) {
return null;
}
return (
<>
<DropButton