from api content automation how to setACE on a document

I would like to know the list of values allowed in the parameter “permission” of the Document.setACE function. In the same function what are the values allowed in the acl parameter ?

I tried permission=READ, acl=local, user=vieville and the ui displays “label.security.permission.rEAD” in the field “Permission accordée”

Thank you for your help

0 votes

1 answers

1684 views

ANSWER



Here is the snippet for setting permissions locally:

HttpAutomationClient autoclient = new HttpAutomationClient(“http://localhost:8080/nuxeo/site/automation”); Session session = autoclient.getSession(“user”, “password”); DocumentService documentService = new DocumentService(session); Document root = (Document) session.newRequest(“Document.Fetch”).set(“value”, /docPath/docName).execute(); documentService.setPermission(root, userName/groupName, “Read”);

0 votes