jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1483906 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java
Date Fri, 17 May 2013 16:37:16 GMT
Author: angela
Date: Fri May 17 16:37:16 2013
New Revision: 1483906

URL: http://svn.apache.org/r1483906
Log:
OAK-527: permissions (tests)

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java?rev=1483906&r1=1483905&r2=1483906&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java
Fri May 17 16:37:16 2013
@@ -42,6 +42,21 @@ import org.junit.Test;
 public class AccessControlManagementTest extends AbstractEvaluationTest {
 
     @Test
+    public void testReadAccessControlContent() throws Exception {
+        // test access to ac content if the corresponding access controlled
+        // parent node is not accessible.
+        allow(path, privilegesFromName(Privilege.JCR_READ_ACCESS_CONTROL));
+        deny(path, privilegesFromName(Privilege.JCR_READ));
+
+        // the policy node however must be visible to the test-user
+        assertTrue(testSession.nodeExists(path + "/rep:policy"));
+        assertTrue(testSession.propertyExists(path + "/rep:policy/jcr:primaryType"));
+
+        assertFalse(testSession.nodeExists(path));
+        assertFalse(testSession.propertyExists(path + "/jcr:primaryType"));
+    }
+
+    @Test
     public void testAccessControlPrivileges() throws Exception {
         /* grant 'testUser' rep:write, rep:readAccessControl and
            rep:modifyAccessControl privileges at 'path' */



Mime
View raw message