How do i check permission of a document?

i want to check permission on a document(like folder) through do i get all permission on a document like read, there any API.

Thanks in advance.

1 votes

1 answers



Document doc =documents.get(0); on this document i want to check permission(read,write). without using CoreSession through AutomationClient

Here is the REST API you can use to check Permission on a doc:


ex : http://localhost:8080/nuxeo/site/api/v1/path/default-domain/workspaces/@acl this gives me a json which contains permission info on Folder workspaces.

for setting permission you need to use Nuxeo Automation Client. below is the code snippet for the same: 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