11-06-2019 05:47 PM
Hello, I need to hide the remove workspace button from the web UI. So far I have written a filter extension to grant delete permission only to workspace types and administrators members:
<extension point="filters" target="org.nuxeo.ecm.platform.actions.ActionService">
<filter id="canRemove">
<rule grant="true">
<permission>Remove</permission>
<type>Workspace</type>
<group>administrators</group>
</rule>
</filter>
</extension>
Also I found this guide https://www.nuxeo.com/blog/qa-friday-remove-tabs-buttons-links-specific-path/ which says I need to associate the filter to the action id in order to override it. So I coded another extension to associate it like this:
<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
<action id="TAB_TRASH_CONTENT">
<filter-id>canRemove</filter-id>
</action>
<action id="CURRENT_SELECTION_TRASH">
<filter-id>canRemove</filter-id>
</action>
</extension>
However it is not working with any of this id's, and I can't find what the actual action id is, despite searching through the nuxeo explorer as the blog entry suggested I've yet to find it. How else can I find the action id for the delete button? Or is my extension wrong?
11-11-2019 08:26 AM
Hello,
This is because the UI display logic is in the delete button element : https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nux... i.e. it controls Write
permissions. So implement your own UI contributions
Regards
11-11-2019 08:26 AM
Hello,
This is because the UI display logic is in the delete button element : https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nux... i.e. it controls Write
permissions. So implement your own UI contributions
Regards
11-12-2019 01:40 PM
Thank you for your answer. I modified the method with my custom logic and have been trying to make it work but found this error
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.