🛂(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:
@@ -19,6 +19,10 @@ export const DocsGridActions = ({ doc }: DocsGridActionsProps) => {
|
|||||||
const [isModalRemoveOpen, setIsModalRemoveOpen] = useState(false);
|
const [isModalRemoveOpen, setIsModalRemoveOpen] = useState(false);
|
||||||
const [isDropOpen, setIsDropOpen] = useState(false);
|
const [isDropOpen, setIsDropOpen] = useState(false);
|
||||||
|
|
||||||
|
if (!doc.abilities.partial_update && !doc.abilities.destroy) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DropButton
|
<DropButton
|
||||||
|
|||||||
Reference in New Issue
Block a user