jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1466406 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java
Date Wed, 10 Apr 2013 09:40:36 GMT
Author: angela
Date: Wed Apr 10 09:40:36 2013
New Revision: 1466406

URL: http://svn.apache.org/r1466406
Log:
OAK-527: permissions (wip, fix tests and add comments why they fail)

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java?rev=1466406&r1=1466405&r2=1466406&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AbstractEvaluationTest.java
Wed Apr 10 09:40:36 2013
@@ -39,6 +39,7 @@ import org.apache.jackrabbit.api.securit
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
+import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.api.security.AbstractAccessControlTest;
 import org.junit.After;
@@ -74,7 +75,6 @@ public abstract class AbstractEvaluation
     protected Session testSession;
     protected AccessControlManager testAcMgr;
 
-    private Node trn;
     private Set<String> toClear = new HashSet<String>();
 
     @Override
@@ -110,7 +110,7 @@ public abstract class AbstractEvaluation
         siblingPath = n2.getPath();
 
         // setup default permissions
-        AccessControlUtils.addAccessControlEntry(superuser, "/", testUser.getPrincipal(),
privilegesFromName(Privilege.JCR_READ), true);
+        AccessControlUtils.addAccessControlEntry(superuser, "/", EveryonePrincipal.getInstance(),
privilegesFromName(Privilege.JCR_READ), true);
         superuser.save();
 
         testSession = getTestSession();
@@ -131,6 +131,7 @@ public abstract class AbstractEvaluation
             if (testSession != null && testSession.isLive()) {
                 testSession.logout();
             }
+            superuser.refresh(false);
             for (String path : toClear) {
                 AccessControlPolicy[] policies = acMgr.getPolicies(path);
                 for (AccessControlPolicy policy : policies) {



Mime
View raw message