[prev in list] [next in list] [prev in thread] [next in thread]
List: lenya-dev
Subject: [Lenya Wiki] Update of "JcrAccessControl" by AndreasHartmann
From: Apache Wiki <wikidiffs () apache ! org>
Date: 2008-06-27 13:45:21
Message-ID: 20080627134521.15307.74031 () eos ! apache ! org
[Download RAW message or body]
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: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic