cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding delete button

a_c
Confirmed Champ
Confirmed Champ

Hello, I need to hide the remove workspace button from the web UI. button i need to hide 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?

1 ACCEPTED ANSWER

Gregory_Carlin
Elite Collaborator
Elite Collaborator

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

View answer in original post

2 REPLIES 2

Gregory_Carlin
Elite Collaborator
Elite Collaborator

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

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

Getting started

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.