jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1373923 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java
Date Thu, 16 Aug 2012 17:05:48 GMT
Author: angela
Date: Thu Aug 16 17:05:48 2012
New Revision: 1373923

URL: http://svn.apache.org/viewvc?rev=1373923&view=rev
Log:
OAK-51 : Implement JCR Access Control Management  (Work In Progress)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java?rev=1373923&r1=1373922&r2=1373923&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java
Thu Aug 16 17:05:48 2012
@@ -31,8 +31,13 @@ import org.apache.jackrabbit.oak.util.No
  */
 public class PermissionValidatorProvider implements ValidatorProvider {
 
-    private final AccessControlContext acContext = null; // TODO
-    private final ContentSession contentSession = null; // TODO
+    private final ContentSession contentSession;
+    private final AccessControlContext accessControlContext;
+
+    public PermissionValidatorProvider(ContentSession contentSession, AccessControlContext
accessControlContext) {
+        this.contentSession = contentSession;
+        this.accessControlContext = accessControlContext;
+    }
 
     //--------------------------------------------------< ValidatorProvider >---
     @Nonnull
@@ -40,6 +45,6 @@ public class PermissionValidatorProvider
     public Validator getRootValidator(NodeState before, NodeState after) {
         NodeUtil rootBefore = new NodeUtil(new ReadOnlyTree(before), contentSession);
         NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after), contentSession);
-        return new PermissionValidator(acContext.getPermissions(), rootBefore, rootAfter);
+        return new PermissionValidator(accessControlContext.getPermissions(), rootBefore,
rootAfter);
     }
 }
\ No newline at end of file



Mime
View raw message