jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1452728 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/authorization/ security/user/ spi/lifecycle/ spi/security/
Date Tue, 05 Mar 2013 10:37:25 GMT
Author: alexparvulescu
Date: Tue Mar  5 10:37:24 2013
New Revision: 1452728

URL: http://svn.apache.org/r1452728
Log:
OAK-443 UserInitializer causes repository traversal

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlInitializer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/WorkspaceInitializer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.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=1452728&r1=1452727&r2=1452728&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
Tue Mar  5 10:37:24 2013
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.securi
 import javax.annotation.Nonnull;
 
 import com.google.common.collect.ImmutableList;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexUtils;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer;
@@ -36,7 +35,7 @@ public class AccessControlInitializer im
 
     @Nonnull
     @Override
-    public NodeState initialize(NodeState workspaceRoot, String workspaceName, IndexHookProvider
indexHook, QueryIndexProvider indexProvider, CommitHook commitHook) {
+    public NodeState initialize(NodeState workspaceRoot, String workspaceName, QueryIndexProvider
indexProvider, CommitHook commitHook) {
         NodeBuilder root = workspaceRoot.builder();
         // property index for rep:principalName stored in ACEs
         NodeBuilder index = IndexUtils.getOrCreateOakIndex(root);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java?rev=1452728&r1=1452727&r2=1452728&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserInitializer.java
Tue Mar  5 10:37:24 2013
@@ -26,12 +26,11 @@ import org.apache.jackrabbit.oak.api.Roo
 import org.apache.jackrabbit.oak.core.RootImpl;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexUtils;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore;
 import org.apache.jackrabbit.oak.security.authentication.SystemSubject;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
 import org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
@@ -86,13 +85,13 @@ public class UserInitializer implements 
     @Nonnull
     @Override
     public NodeState initialize(NodeState workspaceRoot, String workspaceName,
-                                IndexHookProvider indexHook, QueryIndexProvider indexProvider,
+                                QueryIndexProvider indexProvider,
                                 CommitHook commitHook) {
         MemoryNodeStore store = new MemoryNodeStore();
         NodeStoreBranch branch = store.branch();
         branch.setRoot(workspaceRoot);
         try {
-            branch.merge(IndexHookManager.of(indexHook));
+            branch.merge(EmptyHook.INSTANCE);
         } catch (CommitFailedException e) {
             throw new RuntimeException(e);
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java?rev=1452728&r1=1452727&r2=1452728&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
Tue Mar  5 10:37:24 2013
@@ -56,7 +56,7 @@ public final class OakInitializer {
         NodeStoreBranch branch = store.branch();
         NodeState root = branch.getHead();
         for (WorkspaceInitializer wspInit : initializer) {
-            root = wspInit.initialize(root, workspaceName, indexHook, indexProvider, commitHook);
+            root = wspInit.initialize(root, workspaceName, indexProvider, commitHook);
         }
         branch.setRoot(root);
         try {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/WorkspaceInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/WorkspaceInitializer.java?rev=1452728&r1=1452727&r2=1452728&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/WorkspaceInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/WorkspaceInitializer.java
Tue Mar  5 10:37:24 2013
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.oak.spi.li
 
 import javax.annotation.Nonnull;
 
-import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -38,13 +37,13 @@ public interface WorkspaceInitializer {
      *
      * @param workspaceRoot The workspace root state.
      * @param workspaceName The name of the workspace that is being initialized.
-     * @param indexHook     The index hook provider.
      * @param indexProvider The query index provider used within this workspace.
      * @param commitHook    The commit hook(s) defined for this workspace.
      * @return The modified workspace root state.
      */
     @Nonnull
-    NodeState initialize(NodeState workspaceRoot, String workspaceName,
-                         IndexHookProvider indexHook, QueryIndexProvider indexProvider,
+    NodeState initialize(NodeState workspaceRoot, 
+                         String workspaceName,
+                         QueryIndexProvider indexProvider,
                          CommitHook commitHook);
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.java?rev=1452728&r1=1452727&r2=1452728&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.java
Tue Mar  5 10:37:24 2013
@@ -22,7 +22,6 @@ import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CommitHookProvider;
 import org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer;
@@ -70,7 +69,7 @@ public interface SecurityConfiguration {
             return new WorkspaceInitializer() {
                 @Nonnull
                 @Override
-                public NodeState initialize(NodeState workspaceRoot, String workspaceName,
IndexHookProvider indexHook, QueryIndexProvider indexProvider, CommitHook commitHook) {
+                public NodeState initialize(NodeState workspaceRoot, String workspaceName,
QueryIndexProvider indexProvider, CommitHook commitHook) {
                     return workspaceRoot;
                 }
             };



Mime
View raw message