You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by an...@apache.org on 2014/05/14 19:19:16 UTC
svn commit: r1594647 -
/jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md
Author: angela
Date: Wed May 14 17:19:15 2014
New Revision: 1594647
URL: http://svn.apache.org/r1594647
Log:
OAK-301 : oak docu
Modified:
jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md
Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md?rev=1594647&r1=1594646&r2=1594647&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/accesscontrol.md Wed May 14 17:19:15 2014
@@ -165,6 +165,27 @@ org.apache.jackrabbit.oak.spi.security.a
See [Restriction Management](accesscontrol/restriction.html) for details.
+### Utilities
+
+The jcr-commons module present with Jackrabbit provide some access control related
+utilities that simplify the creation of new policies and entries such as for example:
+
+- `AccessControlUtils.getAccessControlList(Session, String)`
+- `AccessControlUtils.getAccessControlList(AccessControlManager, String)`
+- `AccessControlUtils.addAccessControlEntry(Session, String, Principal, String[], boolean)`
+
+See
+[org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils] for
+the complete list of methods.
+
+#### Examples
+
+ String path = node.getPath();
+ JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(session, path);
+ acl.addEntry(principal, privileges, true);
+ acMgr.setPolicy(path, acl);
+ session.save();
+
### Configuration
The following access control related configuration options are present with the [AuthorizationConfiguration] as of Oak 1.0:
@@ -186,27 +207,13 @@ Differences to Jackrabbit 2.x:
- The "omit-default-permission" configuration option present with the Jackrabbit's AccessControlProvider implementations is no longer supported with Oak.
- As of OAK no extra access control content is installed by default which renders that flag superfluous.
+### Pluggability
-### Utilities
-
-The jcr-commons module present with Jackrabbit provide some access control related
-utilities that simplify the creation of new policies and entries such as for example:
-
-- `AccessControlUtils.getAccessControlList(Session, String)`
-- `AccessControlUtils.getAccessControlList(AccessControlManager, String)`
-- `AccessControlUtils.addAccessControlEntry(Session, String, Principal, String[], boolean)`
-
-See
-[org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils] for
-the complete list of methods.
+_todo_
#### Examples
- String path = node.getPath();
- JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(session, path);
- acl.addEntry(principal, privileges, true);
- acMgr.setPolicy(path, acl);
- session.save();
+_todo_
### Further Reading