Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by AndreasHartmann:
http://wiki.apache.org/lenya/JcrAccessControl

------------------------------------------------------------------------------
  
  {{{
  AccessControlManager acMgr = session.getAccessControlManager();
+ 
  Privilege supportedPrivileges = acMgr.getSupportedPrivileges("/lenya");
  Map<String,Privilege> name2privilege = 
mapNamesToPrivileges(supportedPrivileges);
  Privilege[] privileges = {
    name2privilege.get("jcr:read"),
    name2privilege.get("jcr:write")
  };
+ 
+ PrincipalManager principalMgr = session.getPrincipalManager();
+ Principal john = principalMgr.lookupPrincipal("john");
+ 
  acMgr.addAccessControlEntry("/foo/bar", john, privileges);
  }}}
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to