02-17-2016 04:56 PM
hello, In Nuxe 6, i want to block permissions inheritance in an automation Chain
I use "Context.RunScript" to block then inheritance but i ahve an error :
"Error: could not access: session; in class: org.nuxeo.ecm.automation.core.collectors.DocumentModelCollector] [Near : {... security.ACP acp =@{This.session}.getACP(docRef); ....}]"
I can not find the correct syntax to replace @{This.session} ?
Thank
02-18-2016 03:48 AM
Try docModel.getCoreSession(), without @{}.
02-18-2016 09:54 AM
answer :
//block inheritance
org.nuxeo.ecm.core.api.security.ACE myAce = new org.nuxeo.ecm.core.api.security.ACE(org.nuxeo.ecm.core.api.security.SecurityConstants.EVERYONE, org.nuxeo.ecm.core.api.security.SecurityConstants.EVERYTHING, false);
acp.getOrCreateACL().add(myAce);
docModel.getCoreSession().setACP(docRef, acp, true);
"
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
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.