cancel
Showing results for 
Search instead for 
Did you mean: 

Get documents permissions

chouinard_
Champ on-the-rise
Champ on-the-rise

Hi, working with Java Automation Client, I am trying to use the operation Document.GetUsersAndGroups, witch seems to work correctly. But once the request is executed, I am supposed to be able to get the permissions from the 'context' using the 'variable name' I gave to the Document.GetUsersAndGroups operation, as the key.

So my question is how and where do I get to that 'context' to get the key value?

Note that when I execute the operation Document.GetUsersAndGroups I am in a client session of type HttpAutomationClient.

The goal is to read the permissions (users or groups) associated to a document that have been set using the operation 'Document.SetACE'.

Thanks.

2 REPLIES 2

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Hi

if you run Nuxeo 6.0, you d better use the REST API that offers not only automation operations and chains but also web adapters that can provide informations about the ACLs of your documents.

http://doc.nuxeo.com/display/NXDOC/Web+Adapters+for+the+REST+API

If you re not working with both Nuxeo v6 and the REST API, the usual answer is to create your own document type and associated operations since client automation only deals with documents and blobs.

Thank you pibou for your answer. It led me to the right way (I think) to do it by using REST API. I invoke the API with GET /id/{docId}/@acl and then I parse the JSON response.