jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1407070 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java
Date Thu, 08 Nov 2012 13:25:53 GMT
Author: angela
Date: Thu Nov  8 13:25:52 2012
New Revision: 1407070

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

simplify

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java?rev=1407070&r1=1407069&r2=1407070&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java
Thu Nov  8 13:25:52 2012
@@ -31,7 +31,6 @@ import org.apache.jackrabbit.oak.namepat
 import org.apache.jackrabbit.oak.security.AbstractSecurityTest;
 import org.apache.jackrabbit.oak.security.SecurityProviderImpl;
 import org.apache.jackrabbit.oak.security.user.UserConfigurationImpl;
-import org.apache.jackrabbit.oak.security.user.UserManagerImpl;
 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;
@@ -63,9 +62,10 @@ public class PasswordValidationActionTes
 
         root = admin.getLatestRoot();
 
-        userManager = new UserManagerImpl(null, root, NamePathMapper.DEFAULT, getSecurityProvider());
+        userManager = getSecurityProvider().getUserConfiguration().getUserManager(root, NamePathMapper.DEFAULT);
         user = (User) userManager.getAuthorizable(admin.getAuthInfo().getUserID());
 
+        testAction.reset();
         pwAction.setConstraint("^.*(?=.{8,})(?=.*[a-z])(?=.*[A-Z]).*");
 
     }
@@ -165,6 +165,11 @@ public class PasswordValidationActionTes
         private int onCreateCalled = 0;
         private int onPasswordChangeCalled = 0;
 
+        void reset() {
+            onCreateCalled = 0;
+            onPasswordChangeCalled = 0;
+        }
+
         @Override
         public void onCreate(User user, String password, Root root, NamePathMapper namePathMapper)
throws RepositoryException {
             onCreateCalled++;



Mime
View raw message