Hello everyone,

I need a little help with an event listener (documentCreated). I'm trying to
add read permission on the document created for the group test, here is my
source code :

CoreSession documentManager = CoreInstance.getInstance()
.getSession(doc.getSessionId());

try {
 UserManager user_manager = Framework.getLocalService(UserManager.class);;
  user_manager.createGroup(new NuxeoGroupImpl("test"));

 SecurityActions security_action =
Framework.getLocalService(SecurityActions.class);
  security_action.addPermission
(user_manager.getGroup("test").getName(),SecurityConstants.READ,true);
 security_action.updateSecurityOnDocument();
 } catch (ClientException e) {
}

I don't really understand which document is modified by the method
SecurityActions.addPermission() ...

Thanks for your help.

-- 
Romain FERE
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to