jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1372782 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/PermissionValidatorProvider.java
Date Tue, 14 Aug 2012 08:46:19 GMT
Author: angela
Date: Tue Aug 14 08:46:18 2012
New Revision: 1372782

URL: http://svn.apache.org/viewvc?rev=1372782&view=rev
Log:
minor improvement

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=1372782&r1=1372781&r2=1372782&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
Tue Aug 14 08:46:18 2012
@@ -19,9 +19,7 @@ package org.apache.jackrabbit.oak.securi
 import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.api.ContentSession;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.core.ReadOnlyTree;
-import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.commit.Validator;
 import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.AccessControlContext;
@@ -40,11 +38,8 @@ public class PermissionValidatorProvider
     @Nonnull
     @Override
     public Validator getRootValidator(NodeState before, NodeState after) {
-        NamePathMapper mapper = new NamePathMapper.Default();
-        CoreValueFactory vf = contentSession.getCoreValueFactory();
-
-        NodeUtil rootBefore = new NodeUtil(vf, mapper, new ReadOnlyTree(before));
-        NodeUtil rootAfter = new NodeUtil(vf, mapper, new ReadOnlyTree(after));
+        NodeUtil rootBefore = new NodeUtil(new ReadOnlyTree(before), contentSession);
+        NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after), contentSession);
         return new PermissionValidator(acContext.getPermissions(), rootBefore, rootAfter);
     }
 }
\ No newline at end of file



Mime
View raw message