continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r442351 - /maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Date Mon, 11 Sep 2006 21:03:49 GMT
Author: carlos
Date: Mon Sep 11 14:03:49 2006
New Revision: 442351

URL: http://svn.apache.org/viewvc?view=rev&rev=442351
Log:
Add getSecurityPolicy to user manager

Modified:
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?view=diff&rev=442351&r1=442350&r2=442351
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Mon Sep 11 14:03:49 2006
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.user.model.PasswordRuleViolationException;
 import org.apache.maven.user.model.UserManager;
-import org.apache.maven.user.model.impl.DefaultUserManager;
 import org.apache.maven.user.model.UserSecurityPolicy;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.jpox.SchemaTool;
@@ -126,24 +125,17 @@
 
             createGroups();
 
-            if( userManager instanceof DefaultUserManager )
-            {
-            	UserSecurityPolicy securityPolicy = ((DefaultUserManager) userManager).getSecurityPolicy();
+            UserSecurityPolicy securityPolicy = userManager.getSecurityPolicy();
 
-            	List rules = new ArrayList( securityPolicy.getPasswordRules() ); 
-            	
-				//lift all password restrictions temporarily
-				securityPolicy.getPasswordRules().clear();
-            	
-            	createDefaultUsers();
-                
-            	//put back password validation rules
-                securityPolicy.setPasswordRules( rules );
-            }
-            else
-            {
-            	createDefaultUsers();
-            }
+            List rules = new ArrayList( securityPolicy.getPasswordRules() );
+
+            //lift all password restrictions temporarily
+            securityPolicy.getPasswordRules().clear();
+
+            createDefaultUsers();
+
+            //put back password validation rules
+            securityPolicy.setPasswordRules( rules );
 
             getLogger().info( "... Continuum initialized" );
         }



Mime
View raw message