<?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: Adding Unlock permission to a specific group doesn&amp;apos;t work in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315719#M2720</link>
    <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thank you for your fast answer but my new permission "ReadWriteAndUnlock"   include write permission (ReadWrite)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;permission name="ReadWriteAndUnlock"&amp;gt;
            &amp;lt;include&amp;gt;ReadWrite&amp;lt;/include&amp;gt;
            &amp;lt;include&amp;gt;Unlock&amp;lt;/include&amp;gt;
        &amp;lt;/permission&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How can i implement this scenario ? I dont want my managers have administrator's privilege  only for unlock a document.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 10:13:33 GMT</pubDate>
    <dc:creator>pnux_</dc:creator>
    <dc:date>2019-09-19T10:13:33Z</dc:date>
    <item>
      <title>Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315717#M2718</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I use Nuxeo 10.10 with postgresql 11.
I try to add an "unlock" permission to a group named "gestionnaire". User in this group can read write and **unlock ** documents&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;What i have done&lt;/EM&gt; :&lt;/P&gt;
&lt;P&gt;I deployed a contribution following &lt;A href="https://doc.nuxeo.com/nxdoc/1010/how-to-grant-the-edit-permission-without-the-remove-permission/" target="test_blank"&gt;https://doc.nuxeo.com/nxdoc/1010/how-to-grant-the-edit-permission-without-the-remove-permission/&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="fr.my.project.permissions"&amp;gt;
	&amp;lt;require&amp;gt;org.nuxeo.runtime.started&amp;lt;/require&amp;gt;
	&amp;lt;extension target="org.nuxeo.ecm.core.security.SecurityService" point="permissions"&amp;gt;
		&amp;lt;permission name="ReadWriteAndUnlock"&amp;gt;
			&amp;lt;include&amp;gt;ReadWrite&amp;lt;/include&amp;gt;
			&amp;lt;include&amp;gt;Unlock&amp;lt;/include&amp;gt;
		&amp;lt;/permission&amp;gt;
	&amp;lt;/extension&amp;gt;

	&amp;lt;!-- &lt;A href="https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core/src/main/resources/OSGI-INF/permissions-contrib.xml" target="test_blank"&gt;https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core/src/main/resources/OSGI-INF/permissions-contrib.xml&lt;/A&gt; --&amp;gt;
	&amp;lt;extension  target="org.nuxeo.ecm.core.security.SecurityService" point="permissionsVisibility"&amp;gt;
		&amp;lt;visibility&amp;gt;
			&amp;lt;item order="10" show="true"&amp;gt;Read&amp;lt;/item&amp;gt;
			&amp;lt;item order="50" denyPermission="Write" show="true"&amp;gt;ReadWrite&amp;lt;/item&amp;gt;
			&amp;lt;item order="55" denyPermission="Unlock" show="true"&amp;gt;ReadWriteAndUnlock&amp;lt;/item&amp;gt;
			&amp;lt;item order="100" show="true"&amp;gt;Everything&amp;lt;/item&amp;gt;
	&amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;On repository, i added permissions on the workspace&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="type an image title"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1942i9D33EBCEDBBE693A/image-size/large?v=v2&amp;amp;px=999" role="button" title="type an image title" alt="type an image title" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;_What i expect _ :&lt;/P&gt;
&lt;P&gt;A user in default "members" group can lock a document he created. (So he can unlock it too)
A user in "manager" group can unlock a document locked by a user of "member"s group (because i had unlock permission)&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The problem&lt;/EM&gt; :&lt;/P&gt;
&lt;P&gt;A user in "manager" group** can't** unlock a document locked by a user of "member"s group.
&lt;STRONG&gt;No unlock&lt;/STRONG&gt; button is diplayed in webui.&lt;/P&gt;
&lt;P&gt;What did I miss?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 09:29:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315717#M2718</guid>
      <dc:creator>pnux_</dc:creator>
      <dc:date>2019-09-19T09:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315718#M2719</link>
      <description>&lt;P&gt;This is probably due to the fact that the element displaying the lock and unlock action is filtering with the "Write" permission: &lt;A href="https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-lock-toggle-button.html#L133" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-ui-elements/blob/08fd256fb4e7775375c176892098baec21fe302d/actions/nuxeo-lock-toggle-button.html#L133&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 09:46:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315718#M2719</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-09-19T09:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315719#M2720</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thank you for your fast answer but my new permission "ReadWriteAndUnlock"   include write permission (ReadWrite)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;permission name="ReadWriteAndUnlock"&amp;gt;
            &amp;lt;include&amp;gt;ReadWrite&amp;lt;/include&amp;gt;
            &amp;lt;include&amp;gt;Unlock&amp;lt;/include&amp;gt;
        &amp;lt;/permission&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How can i implement this scenario ? I dont want my managers have administrator's privilege  only for unlock a document.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 10:13:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315719#M2720</guid>
      <dc:creator>pnux_</dc:creator>
      <dc:date>2019-09-19T10:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315720#M2721</link>
      <description>&lt;P&gt;I suggest you to make a JSON export of the document to be sure about the permissions which are set on, and check with the Browser console what's happening exactly (with breaking points and co)&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 12:17:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315720#M2721</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-09-19T12:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315721#M2722</link>
      <description>&lt;P&gt;I have checked JSON export of the document when it is **locked **by another user&lt;/P&gt;
&lt;P&gt;Here they are :&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;"permissions": [ "ReadProperties", "ReadSecurity", "ReadVersion", "Read", "ReadChildren", "ReadLifeCycle", "ReviewParticipant", "Unlock", "ReadWrite", "Browse", "ReadWriteAndUnlock" ]&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;when the document is &lt;STRONG&gt;unlocked&lt;/STRONG&gt; i have the following permission&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;"permissions": [ "Write", "WriteVersion", "ReadProperties", "ReadSecurity", "Remove", "ReadVersion", "Read", "WriteLifeCycle", "ReadChildren", "AddChildren", "ReadLifeCycle", "RemoveChildren", "ReviewParticipant", "Unlock", "ReadWrite", "Browse", "ReadWriteAndUnlock", "WriteProperties", "ManageWorkflows" ] &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I think the problem is similar of this old one (for JSF UI : &lt;A href="https://jira.nuxeo.com/browse/NXP-15232" target="test_blank"&gt;https://jira.nuxeo.com/browse/NXP-15232&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;What do you think ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 15:04:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315721#M2722</guid>
      <dc:creator>pnux_</dc:creator>
      <dc:date>2019-09-19T15:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Unlock permission to a specific group doesn&amp;apos;t work</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315722#M2723</link>
      <description>&lt;P&gt;Okay, I made a little patch and it works.
My user in "gestionnaire" group can unlock the doc&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;_isAvailable(doc) {
          return doc &amp;amp;&amp;amp; !doc.isVersion &amp;amp;&amp;amp; (this.hasPermission(doc, 'Unlock') || this.hasPermission(doc, 'Write') ) &amp;amp;&amp;amp; !this.isImmutable(doc)
        }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I think it's not the correct way to do what i want.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 16:24:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/adding-unlock-permission-to-a-specific-group-doesn-apos-t-work/m-p/315722#M2723</guid>
      <dc:creator>pnux_</dc:creator>
      <dc:date>2019-09-19T16:24:53Z</dc:date>
    </item>
  </channel>
</rss>

