04-10-2014 06:45 AM
Hello,
I am using nuxeo automation client to see the documents and folders in my nuxeo repository. My goal is to print a tree with the documents AND their rights.
The point is, I don't know how to get the ACL/ACE of a document since the only properties I find when I do
ArrayList<CUFRDoc> father = doc.getDocuments(session,"SELECT * FROM Document WHERE ecm:path='/default-domain/workspaces/Stage/test1'");
//Properties
PropertyMap properties = father.get(0).getProperties();
Set<String> pkeys = properties.getKeys();
for(String pk : pkeys){
System.out.println(pk);
}
are dc:title and dc:modified.
Is there a way to get the ACL/ACE of a document with the nuxeo Automation client ?
04-10-2014 02:26 PM
Hello,
Indeed, Automation API doesn't provide GET method for document ACLs, only Set and Remove operations (on purpose)
I advise you to take a look at the new REST API of Nuxeo letting you getting all kind of information of documents: http://doc.nuxeo.com/display/NXDOC/Resources+Endpoints
The resource endpoint you're looking for, is the "aclAdapter": GET /path/{docPath}/@acl You have to use a rest client to execute this GET method.
We're currently building REST API client in Java or other languages client side.
Thanks
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.