diff options
author | Olivier Lamy <olamy@apache.org> | 2012-12-11 15:58:58 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-12-11 15:58:58 +0000 |
commit | f1028d61bc607bb8960d85ad49bd36f00247dce1 (patch) | |
tree | a33cf25b5b49e492617cfe062d89323770cc233f /archiva-modules | |
parent | 17c210e4b63bcfbafc097deabcab38cd9257efee (diff) | |
download | archiva-f1028d61bc607bb8960d85ad49bd36f00247dce1.tar.gz archiva-f1028d61bc607bb8960d85ad49bd36f00247dce1.zip |
reload passwordRules in case of configuration change
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1420238 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java index 05c0de45d..6b68fce11 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java @@ -23,6 +23,7 @@ import org.apache.archiva.admin.model.beans.ArchivaRuntimeConfiguration; import org.apache.archiva.admin.model.runtime.ArchivaRuntimeConfigurationAdmin; import org.apache.archiva.redback.common.ldap.connection.LdapConnectionConfiguration; import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory; +import org.apache.archiva.redback.policy.PasswordRule; import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.rest.api.model.UserManagerImplementationInformation; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; @@ -34,6 +35,7 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.inject.Named; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; @@ -98,6 +100,13 @@ public class DefaultArchivaRuntimeConfigurationService ldapConnectionFactory.initialize(); + Collection<PasswordRule> passwordRules = applicationContext.getBeansOfType( PasswordRule.class ).values(); + + for ( PasswordRule passwordRule : passwordRules ) + { + passwordRule.initialize(); + } + return Boolean.TRUE; } catch ( RepositoryAdminException e ) |