<?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: Hide Edit tab for users with access rights &amp;quot;write&amp;quot; in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/hide-edit-tab-for-users-with-access-rights-quot-write-quot/m-p/328031#M15032</link>
    <description>&lt;P&gt;Hi Bauke,&lt;/P&gt;
&lt;P&gt;Regrets for you because this** question is not answered for past one year**. If you are still in search of a solution then i have the code for it. Paste the code at the same file.&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_WORKSPACE_EDIT"&amp;gt;
    &amp;lt;filter-id&amp;gt;denyForWrite&amp;lt;/filter-id&amp;gt;
  &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;

&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"  point="filters"&amp;gt;
  &amp;lt;filter id="denyForWrite"&amp;gt;
       &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;permission&amp;gt;Manage everything&amp;lt;/permission&amp;gt;
      &amp;lt;type&amp;gt;Workspace&amp;lt;/type&amp;gt;
      &amp;lt;type&amp;gt;WorkspaceRoot&amp;lt;/type&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;The mistake in your code was in the filter.
When edit tab is disabled for &lt;STRONG&gt;Write&lt;/STRONG&gt; permission and you are enabling it for &lt;STRONG&gt;Manage Everything&lt;/STRONG&gt; ,it doesn't make sense as &lt;STRONG&gt;manage everything&lt;/STRONG&gt; has &lt;STRONG&gt;Write&lt;/STRONG&gt; right with in it. So even **Manage Everything ** user is getting blocked.&lt;/P&gt;
&lt;P&gt;My code just enables Edit tab for &lt;STRONG&gt;Manage Everything&lt;/STRONG&gt; right and blocks for all other rights.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2015 13:20:56 GMT</pubDate>
    <dc:creator>kartik_sn</dc:creator>
    <dc:date>2015-11-04T13:20:56Z</dc:date>
    <item>
      <title>Hide Edit tab for users with access rights "write"</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/hide-edit-tab-for-users-with-access-rights-quot-write-quot/m-p/328030#M15031</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;In Nuxeo 5.8 I want to hide the edit tab for users with access rights : "write".
The tab should be available for users with access rights: "manage everything".
In Studio I've added the following extension points:&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_WORKSPACE_EDIT"&amp;gt;
    &amp;lt;filter-id&amp;gt;denyForWrite&amp;lt;/filter-id&amp;gt;
  &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;

&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"  point="filters"&amp;gt;
  &amp;lt;filter id="denyForWrite"&amp;gt;
    &amp;lt;rule grant="false"&amp;gt;
      &amp;lt;permission&amp;gt;Write&amp;lt;/permission&amp;gt;
      &amp;lt;type&amp;gt;Workspace&amp;lt;/type&amp;gt;
      &amp;lt;type&amp;gt;WorkspaceRoot&amp;lt;/type&amp;gt;
    &amp;lt;/rule&amp;gt;
    &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;permission&amp;gt;Manage everything&amp;lt;/permission&amp;gt;
      &amp;lt;type&amp;gt;Workspace&amp;lt;/type&amp;gt;
      &amp;lt;type&amp;gt;WorkspaceRoot&amp;lt;/type&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;For some reason however the tab is also hidden for users with "manage everything" rights, I also noticed that when I don't have the &lt;CODE&gt;&amp;lt;type&amp;gt;WorkspaceRoot&amp;lt;/type&amp;gt;&lt;/CODE&gt; specified it also hides the button in the workspaceroot.
Is there something I'm not doing right?&lt;/P&gt;
&lt;P&gt;Thanks in advance,
Bauke Roo&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2014 10:58:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/hide-edit-tab-for-users-with-access-rights-quot-write-quot/m-p/328030#M15031</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-11-19T10:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Edit tab for users with access rights "write"</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/hide-edit-tab-for-users-with-access-rights-quot-write-quot/m-p/328031#M15032</link>
      <description>&lt;P&gt;Hi Bauke,&lt;/P&gt;
&lt;P&gt;Regrets for you because this** question is not answered for past one year**. If you are still in search of a solution then i have the code for it. Paste the code at the same file.&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_WORKSPACE_EDIT"&amp;gt;
    &amp;lt;filter-id&amp;gt;denyForWrite&amp;lt;/filter-id&amp;gt;
  &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;

&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"  point="filters"&amp;gt;
  &amp;lt;filter id="denyForWrite"&amp;gt;
       &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;permission&amp;gt;Manage everything&amp;lt;/permission&amp;gt;
      &amp;lt;type&amp;gt;Workspace&amp;lt;/type&amp;gt;
      &amp;lt;type&amp;gt;WorkspaceRoot&amp;lt;/type&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;The mistake in your code was in the filter.
When edit tab is disabled for &lt;STRONG&gt;Write&lt;/STRONG&gt; permission and you are enabling it for &lt;STRONG&gt;Manage Everything&lt;/STRONG&gt; ,it doesn't make sense as &lt;STRONG&gt;manage everything&lt;/STRONG&gt; has &lt;STRONG&gt;Write&lt;/STRONG&gt; right with in it. So even **Manage Everything ** user is getting blocked.&lt;/P&gt;
&lt;P&gt;My code just enables Edit tab for &lt;STRONG&gt;Manage Everything&lt;/STRONG&gt; right and blocks for all other rights.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 13:20:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/hide-edit-tab-for-users-with-access-rights-quot-write-quot/m-p/328031#M15032</guid>
      <dc:creator>kartik_sn</dc:creator>
      <dc:date>2015-11-04T13:20:56Z</dc:date>
    </item>
  </channel>
</rss>

