<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hiding delete button in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315679#M2680</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;This is because the UI display logic is in the delete button element : &lt;A href="https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-delete-document-button.html#L115" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-delete-document-button.html#L115&lt;/A&gt; i.e. it controls &lt;CODE&gt;Write&lt;/CODE&gt; permissions. So implement your own UI contributions&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 13:26:09 GMT</pubDate>
    <dc:creator>Gregory_Carlin</dc:creator>
    <dc:date>2019-11-11T13:26:09Z</dc:date>
    <item>
      <title>Hiding delete button</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315678#M2679</link>
      <description>&lt;P&gt;Hello, I need to hide the remove workspace button from the web UI.
&lt;span class="lia-inline-image-display-wrapper" image-alt="button i need to hide"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1938i25F433EFF3FC104E/image-size/large?v=v2&amp;amp;px=999" role="button" title="button i need to hide" alt="button i need to hide" /&gt;&lt;/span&gt;
So far I have written a filter extension to grant delete permission only to workspace types and administrators members:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="filters" target="org.nuxeo.ecm.platform.actions.ActionService"&amp;gt;
    &amp;lt;filter id="canRemove"&amp;gt;
        &amp;lt;rule grant="true"&amp;gt;
            &amp;lt;permission&amp;gt;Remove&amp;lt;/permission&amp;gt;
            &amp;lt;type&amp;gt;Workspace&amp;lt;/type&amp;gt;
            &amp;lt;group&amp;gt;administrators&amp;lt;/group&amp;gt;
        &amp;lt;/rule&amp;gt;
    &amp;lt;/filter&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also I found this guide &lt;A href="https://www.nuxeo.com/blog/qa-friday-remove-tabs-buttons-links-specific-path/"&gt;https://www.nuxeo.com/blog/qa-friday-remove-tabs-buttons-links-specific-path/&lt;/A&gt; which says I need to &lt;STRONG&gt;associate the filter to the action id&lt;/STRONG&gt; in order to override it.
So I coded another extension to associate it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions"&amp;gt;
    &amp;lt;action id="TAB_TRASH_CONTENT"&amp;gt;
            &amp;lt;filter-id&amp;gt;canRemove&amp;lt;/filter-id&amp;gt;
    &amp;lt;/action&amp;gt;
    &amp;lt;action id="CURRENT_SELECTION_TRASH"&amp;gt;
            &amp;lt;filter-id&amp;gt;canRemove&amp;lt;/filter-id&amp;gt;
    &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 22:47:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315678#M2679</guid>
      <dc:creator>a_c</dc:creator>
      <dc:date>2019-11-06T22:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding delete button</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315679#M2680</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;This is because the UI display logic is in the delete button element : &lt;A href="https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-delete-document-button.html#L115" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-delete-document-button.html#L115&lt;/A&gt; i.e. it controls &lt;CODE&gt;Write&lt;/CODE&gt; permissions. So implement your own UI contributions&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 13:26:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315679#M2680</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-11-11T13:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding delete button</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315680#M2681</link>
      <description>&lt;P&gt;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&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 18:40:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/hiding-delete-button/m-p/315680#M2681</guid>
      <dc:creator>a_c</dc:creator>
      <dc:date>2019-11-12T18:40:43Z</dc:date>
    </item>
  </channel>
</rss>

