jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1464659 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java
Date Thu, 04 Apr 2013 17:53:46 GMT
Author: alexparvulescu
Date: Thu Apr  4 17:53:45 2013
New Revision: 1464659

URL: http://svn.apache.org/r1464659
Log:
OAK-734 Refactor indexing code to use Editors

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java?rev=1464659&r1=1464658&r2=1464659&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java
Thu Apr  4 17:53:45 2013
@@ -39,9 +39,11 @@ public class AccessControlInitializer im
         NodeBuilder root = workspaceRoot.builder();
         // property index for rep:principalName stored in ACEs
         NodeBuilder index = IndexUtils.getOrCreateOakIndex(root);
-        IndexUtils.createIndexDefinition(index, "acPrincipalName", true, false,
-                ImmutableList.<String>of(REP_PRINCIPAL_NAME),
-                ImmutableList.<String>of(NT_REP_DENY_ACE, NT_REP_GRANT_ACE));
+        if (!index.hasChildNode("acPrincipalName")) {
+            IndexUtils.createIndexDefinition(index, "acPrincipalName", true, false,
+                    ImmutableList.<String>of(REP_PRINCIPAL_NAME),
+                    ImmutableList.<String>of(NT_REP_DENY_ACE, NT_REP_GRANT_ACE));
+        }
         return root.getNodeState();
     }
-}
\ No newline at end of file
+}



Mime
View raw message