jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1400078 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java
Date Fri, 19 Oct 2012 13:01:46 GMT
Author: jukka
Date: Fri Oct 19 13:01:45 2012
New Revision: 1400078

URL: http://svn.apache.org/viewvc?rev=1400078&view=rev
Log:
OAK-50 : Implement User Management

Address FIXME comment in RepositoryCallback. Remove unused logger.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java?rev=1400078&r1=1400077&r2=1400078&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/RepositoryCallback.java
Fri Oct 19 13:01:45 2012
@@ -17,17 +17,11 @@
 package org.apache.jackrabbit.oak.spi.security.authentication.callback;
 
 import javax.annotation.CheckForNull;
-import javax.jcr.NoSuchWorkspaceException;
 import javax.security.auth.callback.Callback;
-import javax.security.auth.login.LoginException;
 
 import org.apache.jackrabbit.oak.api.Root;
-import org.apache.jackrabbit.oak.core.ContentRepositoryImpl;
-import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
-import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.apache.jackrabbit.oak.core.RootImpl;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Callback implementation used to access the repository. It allows to set and
@@ -37,8 +31,6 @@ import org.slf4j.LoggerFactory;
  */
 public class RepositoryCallback implements Callback {
 
-    private static final Logger log = LoggerFactory.getLogger(RepositoryCallback.class);
-
     private NodeStore nodeStore;
     private String workspaceName;
 
@@ -54,15 +46,7 @@ public class RepositoryCallback implemen
     @CheckForNull
     public Root getRoot() {
         if (nodeStore != null) {
-            try {
-                // FIXME: need a direct and fast way to create Root from the node store without
having to call login
-                SecurityProvider sp = new OpenSecurityProvider();
-                return new ContentRepositoryImpl(nodeStore, null, null, sp).login(null, workspaceName).getLatestRoot();
-            } catch (LoginException e) {
-                log.warn("Internal error ", e.getMessage());
-            } catch (NoSuchWorkspaceException e) {
-                log.warn("Internal error ", e.getMessage());
-            }
+            return new RootImpl(nodeStore);
         }
         return null;
     }



Mime
View raw message