10-08-2012 06:06 AM
i want to check permission on a document(like folder) through pragmatically.how do i get all permission on a document like read,write.is there any API.
Thanks in advance.
10-08-2012 10:29 AM
Document doc =documents.get(0);
11-11-2015 07:44 AM
Here is the REST API you can use to check Permission on a doc:
http://localhost:8080/nuxeo/site/api/v1/path/<Folder_Path>/@acl
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");
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.