jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1455448 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Date Tue, 12 Mar 2013 08:58:02 GMT
Author: angela
Date: Tue Mar 12 08:58:02 2013
New Revision: 1455448

URL: http://svn.apache.org/r1455448
Log:
OAK-51 : Access Control Management (wip, make sure tck setup grants read-access for the configured
read-only session)

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java?rev=1455448&r1=1455447&r2=1455448&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Tue Mar 12 08:58:02 2013
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.Calendar;
-
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.PropertyType;
@@ -29,14 +28,16 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
+import javax.jcr.security.Privilege;
 
+import com.google.common.base.Charsets;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.commons.cnd.CndImporter;
 import org.apache.jackrabbit.commons.cnd.ParseException;
+import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
+import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal;
 import org.apache.jackrabbit.value.BinaryValue;
 
-import com.google.common.base.Charsets;
-
 public class TestContentLoader {
 
     /**
@@ -63,6 +64,9 @@ public class TestContentLoader {
         // Node conf = getOrAddNode(session.getRootNode(), "testconf");
         // addRetentionTestData(getOrAddNode(conf, "retentionTest"));
 
+        // TODO add proper configuration for security setup
+        AccessControlUtils.addAccessControlEntry(session, "/", EveryonePrincipal.getInstance(),
new String[]{Privilege.JCR_READ}, true);
+
         session.save();
     }
 



Mime
View raw message