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 ------------------------------------------------------------------------------ - === JSR-170 (JCR 1.0) === + == JSR-170 (JCR 1.0) == - === JSR-283 (JCR 2.0) === + == JSR-283 (JCR 2.0) == * Access Control Policies * Abstract concept, no concrete meaning @@ -11, +11 @@ * Grants a set of privileges to a principal (user/group/role/â¦) * Can only grant permissions, not revoke them + === Examples === + + Set a policy on a node: + + {{{ + 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") + }; + acMgr.addAccessControlEntry("/foo/bar", john, privileges); + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
