jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1483689 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java
Date Fri, 17 May 2013 08:38:18 GMT
Author: angela
Date: Fri May 17 08:38:18 2013
New Revision: 1483689

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

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java?rev=1483689&r1=1483688&r2=1483689&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImplTest.java
Fri May 17 08:38:18 2013
@@ -392,19 +392,21 @@ public class CompiledPermissionImplTest 
     @Ignore("OAK-774")
     @Test
     public void testGetReadStatusWithRestrictions2() throws Exception {
-        allow(group2, node1Path, 1, JCR_READ);
-        deny(group3, node1Path, 2, JCR_READ);
-        setupPermission(group1, node1Path, true, 0, new String[] {JCR_READ}, createGlobRestriction("/*"));
+        allow(group2, node1Path, 0, JCR_READ);
+        setupPermission(group1, node1Path, true, 1, new String[] {JCR_READ}, createGlobRestriction("/*"));
 
-        CompiledPermissionImpl cp = createPermissions(ImmutableSet.of(group1));
-        assertReadStatus(ReadStatus.DENY_THIS, ReadStatus.ALLOW_THIS, cp, ImmutableList.<String>of(node1Path));
-        assertReadStatus(ReadStatus.ALLOW_THIS, cp, node2Path);
+        CompiledPermissionImpl cp = createPermissions(ImmutableSet.of(group1, group2));
+        assertReadStatus(ReadStatus.ALLOW_THIS, cp, nodePaths);  // TODO: should be ALLOW_ALL_REGULAR
but requires detection of redundant ace
+    }
 
-        cp = createPermissions(ImmutableSet.of(group1, group2));
-        assertReadStatus(ReadStatus.ALLOW_THIS, cp, node1Path);
-        assertReadStatus(ReadStatus.ALLOW_THIS, cp, node2Path);
+    @Ignore("OAK-774")
+    @Test
+    public void testGetReadStatusWithRestrictions3() throws Exception {
+        allow(group2, node1Path, 0, JCR_READ);
+        deny(group3, node1Path, 1, JCR_READ);
+        setupPermission(group1, node1Path, true, 2, new String[] {JCR_READ}, createGlobRestriction("/*"));
 
-        cp = createPermissions(ImmutableSet.of(group1, group2, group3));
+        CompiledPermissions cp = createPermissions(ImmutableSet.of(group1, group2, group3));
         assertReadStatus(ReadStatus.DENY_THIS, ReadStatus.ALLOW_THIS, cp, ImmutableList.<String>of(node1Path));
         assertReadStatus(ReadStatus.ALLOW_THIS, cp, node2Path);
     }



Mime
View raw message