jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1401667 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/user/UserConfigurationImpl.java security/user/UserManagerImpl.java spi/security/user/UserConfiguration.java
Date Wed, 24 Oct 2012 13:17:48 GMT
Author: angela
Date: Wed Oct 24 13:17:48 2012
New Revision: 1401667

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

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserConfigurationImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserConfigurationImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserConfigurationImpl.java?rev=1401667&r1=1401666&r2=1401667&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserConfigurationImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserConfigurationImpl.java
Wed Oct 24 13:17:48 2012
@@ -28,6 +28,7 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 import org.apache.jackrabbit.oak.spi.security.user.UserConfiguration;
+import org.apache.jackrabbit.oak.spi.security.user.action.AuthorizableAction;
 
 /**
  * UserConfigurationImpl... TODO
@@ -37,7 +38,8 @@ public class UserConfigurationImpl imple
     private final ConfigurationParameters config;
     private final SecurityProvider securityProvider;
 
-    public UserConfigurationImpl(ConfigurationParameters config, SecurityProvider securityProvider)
{
+    public UserConfigurationImpl(ConfigurationParameters config,
+                                 SecurityProvider securityProvider) {
         this.config = config;
         this.securityProvider = securityProvider;
     }
@@ -54,6 +56,13 @@ public class UserConfigurationImpl imple
         return Collections.singletonList(vp);
     }
 
+    @Nonnull
+    @Override
+    public List<AuthorizableAction> getAuthorizableActions() {
+        // TODO: create authorizable actions from configuration
+        return Collections.emptyList();
+    }
+
     @Override
     public UserManager getUserManager(Root root, NamePathMapper namePathMapper, Session session)
{
         return new UserManagerImpl(session, root, namePathMapper, securityProvider);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java?rev=1401667&r1=1401666&r2=1401667&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java
Wed Oct 24 13:17:48 2012
@@ -20,6 +20,7 @@ import java.io.UnsupportedEncodingExcept
 import java.security.NoSuchAlgorithmException;
 import java.security.Principal;
 import java.util.Iterator;
+import java.util.List;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.jcr.Node;
@@ -66,7 +67,7 @@ public class UserManagerImpl implements 
     private final UserProvider userProvider;
     private final MembershipProvider membershipProvider;
     private final ConfigurationParameters config;
-    private final AuthorizableAction[] authorizableActions;
+    private final List<AuthorizableAction> authorizableActions;
 
     private UserQueryManager queryManager;
 
@@ -81,7 +82,7 @@ public class UserManagerImpl implements 
         this.config = uc.getConfigurationParameters();
         this.userProvider = new UserProvider(root, config);
         this.membershipProvider = new MembershipProvider(root, config);
-        this.authorizableActions = config.getConfigValue(UserConstants.PARAM_AUTHORIZABLE_ACTIONS,
new AuthorizableAction[0]);
+        this.authorizableActions = uc.getAuthorizableActions();
     }
 
     //--------------------------------------------------------< UserManager >---

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java?rev=1401667&r1=1401666&r2=1401667&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java
Wed Oct 24 13:17:48 2012
@@ -23,8 +23,9 @@ import javax.jcr.Session;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
-import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
+import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
+import org.apache.jackrabbit.oak.spi.security.user.action.AuthorizableAction;
 
 /**
  * UserContext... TODO
@@ -38,6 +39,9 @@ public interface UserConfiguration {
     List<ValidatorProvider> getValidatorProviders();
 
     @Nonnull
+    List<AuthorizableAction> getAuthorizableActions();
+
+    @Nonnull
     UserManager getUserManager(Root root, NamePathMapper namePathMapper, Session session);
 
     @Nonnull



Mime
View raw message