01-17-2017 06:40 PM
I am trying to assign a permanent permission to a group but I got null pointer exception when begin or end dates are not defined.
ACE ace = new ACE();
ace.setUsername(username);
ace.setPermission("Everything");
ace.setCreator(nuxeologin);
ace.setBlockInheritance(true);
newFolder.addPermission(ace);
Exception in thread "main" java.lang.NullPointerException
at org.nuxeo.client.api.objects.acl.ACE.getBeginAsString(ACE.java:152)
at org.nuxeo.client.api.objects.Document.setPermissionAutomationParameters(Document.java:422)
at org.nuxeo.client.api.objects.Document.addPermission(Document.java:416)
how can I do this?
Tks
01-18-2017 05:47 PM
I have found a way by passing the add permission call and going directly to nuxeoClient
Map<String, Object> params = new HashMap<>();
params.put("user", ace.getUsername());
params.put("permission", ace.getPermission());
params.put("creator", ace.getCreator());
params.put("blockInheritance", ace.isBlockInheritance());
params.put("comment", ace.getComment());
params.put("notify", ace.isNotify());
nuxeoClient.automation("Document.AddPermission").input(newFolder).parameters(params).execute();
01-24-2017 07:46 AM
Hi,
Thanks for your feedback! I've created the following issue to track the bug.
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.