Retrieve permission with Document.GetUsersAndGroups

Hi,

I try to improve Nuxeo Android Client with getUsersAndGroups feature but I doesn't understand how it works.

this is my request:

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();

As describes in the Automation documentation : the chain takes 2 args mandatory (“permission” and “variable name”)

This chains code is detailed on GetDocumentUsersAndGroups class. A key which correspond with the “variable name” arguments should be set to the OperationContext.

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:

{"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":{}}

There are few samples of this feature, that's why I ask you, Thanks a lot,

0 votes

0 answers

1670 views

ANSWER