jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1447803 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/security/authorization/ main/java/org/apache/jackrabbit/oak/security/privilege/ test/java/org/apache/jackrabbit/oak/security/authorization/
Date Tue, 19 Feb 2013 16:37:32 GMT
Author: angela
Date: Tue Feb 19 16:37:31 2013
New Revision: 1447803

URL: http://svn.apache.org/r1447803
Log:
OAK-644 : Revisit PrivilegeDefinitionStore's use of null as a child name parameter

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlConfigurationImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeDefinitionStore.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlConfigurationImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlConfigurationImpl.java?rev=1447803&r1=1447802&r2=1447803&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlConfigurationImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlConfigurationImpl.java
Tue Feb 19 16:37:31 2013
@@ -70,7 +70,8 @@ public class AccessControlConfigurationI
         return new CommitHookProvider() {
             @Override
             public CommitHook getCommitHook(String workspaceName) {
-                return new CompositeHook(new PermissionHook(workspaceName), new VersionablePathHook(workspaceName));
+                //FIXME return new CompositeHook(new PermissionHook(workspaceName), new VersionablePathHook(workspaceName));
+                return new CompositeHook(new VersionablePathHook(workspaceName));
             }
         };
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeDefinitionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeDefinitionStore.java?rev=1447803&r1=1447802&r2=1447803&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeDefinitionStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeDefinitionStore.java
Tue Feb 19 16:37:31 2013
@@ -38,6 +38,8 @@ import org.apache.jackrabbit.oak.util.Tr
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 /**
  * Reads and writes privilege definitions from and to the repository content
  * without applying any validation.
@@ -110,7 +112,7 @@ public class PrivilegeDefinitionStore im
         }
         PrivilegeBits bits = PrivilegeBits.getInstance();
         for (String privilegeName : privilegeNames) {
-            Tree defTree = privilegesTree.getChild(privilegeName);
+            Tree defTree = privilegesTree.getChild(checkNotNull(privilegeName));
             if (defTree != null) {
                 bits.add(PrivilegeBits.getInstance(defTree));
             }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java?rev=1447803&r1=1447802&r2=1447803&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
Tue Feb 19 16:37:31 2013
@@ -557,7 +557,6 @@ public class AccessControlManagerImplTes
         // TODO
     }
 
-    @Ignore("OAK-644")
     @Test
     public void testSetPolicy() throws Exception {
         ACL acl = getApplicablePolicy(testPath);
@@ -576,7 +575,6 @@ public class AccessControlManagerImplTes
         assertArrayEquals(acl.getAccessControlEntries(), acl2.getAccessControlEntries());
     }
 
-    @Ignore("OAK-644")
     @Test
     public void testSetPolicyWritesAcContent() throws Exception {
         ACL acl = getApplicablePolicy(testPath);
@@ -609,7 +607,7 @@ public class AccessControlManagerImplTes
         assertEquals("*/something", restr.getString(REP_GLOB, null));
     }
 
-    @Ignore()
+    @Ignore("OAK-51")
     @Test
     public void testModifyExistingPolicy() throws Exception {
         ACL acl = getApplicablePolicy(testPath);
@@ -637,7 +635,7 @@ public class AccessControlManagerImplTes
         assertEquals(denyEveryone, aces[0]);
         assertEquals(allowTest, aces[1]);
 
-        acl.addEntry(testPrincipal, new Privilege[] {acMgr.privilegeFromName(PrivilegeConstants.JCR_ALL)},
+        acl.addEntry(testPrincipal, new Privilege[]{acMgr.privilegeFromName(PrivilegeConstants.JCR_ALL)},
                 false, Collections.<String, Value>emptyMap());
         AccessControlEntry denyTest = acl.getAccessControlEntries()[2];
 



Mime
View raw message