Can I hide Empty Trash from some users?

We would like to only have the admins empty trash. I assume I need to make an extension point but I'm having a hard time finding where the Empty Trash button is in our project.

0 votes

1 answers

127 views

ANSWER



Hi Eric,

If you need to add some filters on the Nuxeo Web UI button to empty the trash, you should contribute to the slot contribution: https://github.com/nuxeo/nuxeo-web-ui/blob/92f887398bdf51835daa4881e2394d719a17af80/elements/nuxeo-web-ui-bundle.html#L702

You should have in your custom bundle file something like:

<nuxeo-slot-content name="hardDeleteSelectionAction" slot="TRASH_RESULTS_SELECTION_ACTIONS" order="20">
<template>
<nuxeo-filter user="[[user]]" expression="user.isAdministrator">
<template>
<nuxeo-delete-documents-button documents="[[selectedItems]]" hard></nuxeo-delete-documents-button>
</template>
</nuxeo-filter>
</template>
</nuxeo-slot-content>
1 votes



Thank you, this worked perfectly
03/11/2021