<?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 Retrieve permission with Document.GetUsersAndGroups in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/retrieve-permission-with-document-getusersandgroups/m-p/323725#M10726</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I try to improve Nuxeo Android Client with getUsersAndGroups feature but I doesn't understand how it works.&lt;/P&gt;
&lt;P&gt;this is my request:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;OperationRequest req = session.newRequest(GetUsersAndGroups).setInput(doc);
        req.set("permission", permission);
        req.set("variable name", "rights");
        req.set("ignore groups", ignoreGroups);
        req.set("prefix identifiers", prefixIdentifiers);
        req.set("resolve groups", resolveGroups);
        Document resultDoc = (Document) req.execute();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Document.GetUsersAndGroups"&gt;As describes in the Automation documentation&lt;/A&gt; :  the chain takes 2 args mandatory ("permission" and "variable name")&lt;/P&gt;
&lt;P&gt;This chains code is detailed on &lt;A href="https://github.com/nuxeo/nuxeo-features/blob/bc2dccdd7d3b86c6aeb195263cf3461539807e5c/nuxeo-automation/nuxeo-automation-features/src/main/java/org/nuxeo/ecm/automation/core/operations/users/GetDocumentUsersAndGroups.java"&gt;GetDocumentUsersAndGroups class&lt;/A&gt;. A key which correspond with the "variable name" arguments should be set to the OperationContext.&lt;/P&gt;
&lt;P&gt;I've hope to retrieve this parameter once the request as been finished but I didn't and the Json returned to me looks like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{"entity-type":"document","repository":"default","uid":"c6ccb7a8-1203-4a2b-87e3-a91aa6250b0d","path":"/default-domain/UserWorkspaces/gardening-manager-gmail-com/test3","type":"Garden","state":"project","versionLabel":"0.0","isCheckedOut":true,"title":"test3","lastModified":"2014-08-08T15:33:40.27Z","facets":["SuperSpace","Folderish"],"changeToken":"1407512020274","contextParameters":{}}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are few samples of this feature, that's why I ask you,
Thanks a lot,&lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2014 19:52:22 GMT</pubDate>
    <dc:creator>Artmoni_Mobile</dc:creator>
    <dc:date>2014-08-08T19:52:22Z</dc:date>
    <item>
      <title>Retrieve permission with Document.GetUsersAndGroups</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/retrieve-permission-with-document-getusersandgroups/m-p/323725#M10726</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I try to improve Nuxeo Android Client with getUsersAndGroups feature but I doesn't understand how it works.&lt;/P&gt;
&lt;P&gt;this is my request:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;OperationRequest req = session.newRequest(GetUsersAndGroups).setInput(doc);
        req.set("permission", permission);
        req.set("variable name", "rights");
        req.set("ignore groups", ignoreGroups);
        req.set("prefix identifiers", prefixIdentifiers);
        req.set("resolve groups", resolveGroups);
        Document resultDoc = (Document) req.execute();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Document.GetUsersAndGroups"&gt;As describes in the Automation documentation&lt;/A&gt; :  the chain takes 2 args mandatory ("permission" and "variable name")&lt;/P&gt;
&lt;P&gt;This chains code is detailed on &lt;A href="https://github.com/nuxeo/nuxeo-features/blob/bc2dccdd7d3b86c6aeb195263cf3461539807e5c/nuxeo-automation/nuxeo-automation-features/src/main/java/org/nuxeo/ecm/automation/core/operations/users/GetDocumentUsersAndGroups.java"&gt;GetDocumentUsersAndGroups class&lt;/A&gt;. A key which correspond with the "variable name" arguments should be set to the OperationContext.&lt;/P&gt;
&lt;P&gt;I've hope to retrieve this parameter once the request as been finished but I didn't and the Json returned to me looks like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{"entity-type":"document","repository":"default","uid":"c6ccb7a8-1203-4a2b-87e3-a91aa6250b0d","path":"/default-domain/UserWorkspaces/gardening-manager-gmail-com/test3","type":"Garden","state":"project","versionLabel":"0.0","isCheckedOut":true,"title":"test3","lastModified":"2014-08-08T15:33:40.27Z","facets":["SuperSpace","Folderish"],"changeToken":"1407512020274","contextParameters":{}}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are few samples of this feature, that's why I ask you,
Thanks a lot,&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:52:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/retrieve-permission-with-document-getusersandgroups/m-p/323725#M10726</guid>
      <dc:creator>Artmoni_Mobile</dc:creator>
      <dc:date>2014-08-08T19:52:22Z</dc:date>
    </item>
  </channel>
</rss>

