From 19f3903ae1a2cbf71519951f935e8e4d45e6c387 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 3 Jan 2013 00:15:11 +0000 Subject: [PATCH] reload ldapusermapper in case of configuration change git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428122 13f79535-47bb-0310-9956-ffa450edef68 --- .../DefaultRedbackRuntimeConfigurationService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java index e7b6328a2..1ada46e17 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java @@ -25,6 +25,7 @@ import org.apache.archiva.admin.model.beans.LdapConfiguration; import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin; import org.apache.archiva.redback.authentication.AuthenticationException; import org.apache.archiva.redback.authentication.Authenticator; +import org.apache.archiva.redback.common.ldap.LdapUserMapper; import org.apache.archiva.redback.common.ldap.connection.LdapConnection; import org.apache.archiva.redback.common.ldap.connection.LdapConnectionConfiguration; import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory; @@ -78,6 +79,9 @@ public class DefaultRedbackRuntimeConfigurationService @Named(value = "cache#users") private Cache usersCache; + @Inject + private LdapUserMapper ldapUserMapper; + public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration() throws ArchivaRestServiceException @@ -149,6 +153,9 @@ public class DefaultRedbackRuntimeConfigurationService usersCache.setMaxElementsOnDisk( redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() ); + + ldapUserMapper.initialize(); + return Boolean.TRUE; } catch ( AuthenticationException e ) -- 2.39.5