jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1409765 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/privilege/PrivilegeInitializer.java spi/security/privilege/PrivilegeConstants.java
Date Thu, 15 Nov 2012 13:12:40 GMT
Author: angela
Date: Thu Nov 15 13:12:39 2012
New Revision: 1409765

URL: http://svn.apache.org/viewvc?rev=1409765&view=rev
Log:
OAK-64 : Privilege Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConstants.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java?rev=1409765&r1=1409764&r2=1409765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
Thu Nov 15 13:12:39 2012
@@ -16,9 +16,7 @@
  */
 package org.apache.jackrabbit.oak.security.privilege;
 
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import javax.jcr.RepositoryException;
 
@@ -49,14 +47,6 @@ class PrivilegeInitializer implements Re
      */
     private static final Logger log = LoggerFactory.getLogger(PrivilegeInitializer.class);
 
-    private static final Map<String, String[]> AGGREGATE_PRIVILEGES = new HashMap<String,String[]>();
-    static {
-        AGGREGATE_PRIVILEGES.put(JCR_READ, AGGR_JCR_READ);
-        AGGREGATE_PRIVILEGES.put(JCR_MODIFY_PROPERTIES, AGGR_JCR_MODIFY_PROPERTIES);
-        AGGREGATE_PRIVILEGES.put(JCR_WRITE, AGGR_JCR_WRITE);
-        AGGREGATE_PRIVILEGES.put(REP_WRITE, AGGR_REP_WRITE);
-    }
-
     @Override
     public void initialize(NodeStore store) {
         NodeStoreBranch branch = store.branch();
@@ -99,4 +89,4 @@ class PrivilegeInitializer implements Re
         }
         return definitions;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConstants.java?rev=1409765&r1=1409764&r2=1409765&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConstants.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConstants.java
Thu Nov 15 13:12:39 2012
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.oak.spi.security.privilege;
 
+import java.util.Map;
+
+import com.google.common.collect.ImmutableMap;
 import org.apache.jackrabbit.JcrConstants;
 
 /**
@@ -89,4 +92,9 @@ public interface PrivilegeConstants {
     String[] AGGR_REP_WRITE = new String[] {
             JCR_WRITE, JCR_NODE_TYPE_MANAGEMENT
     };
+
+    Map<String, String[]> AGGREGATE_PRIVILEGES = ImmutableMap.of(JCR_READ, AGGR_JCR_READ,
+            JCR_MODIFY_PROPERTIES, AGGR_JCR_MODIFY_PROPERTIES,
+            JCR_WRITE, AGGR_JCR_WRITE,
+            REP_WRITE, AGGR_REP_WRITE);
 }
\ No newline at end of file



Mime
View raw message