]> source.dussan.org Git - archiva.git/commitdiff
reload ldapusermapper in case of configuration change
authorOlivier Lamy <olamy@apache.org>
Thu, 3 Jan 2013 00:15:11 +0000 (00:15 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 3 Jan 2013 00:15:11 +0000 (00:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428122 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java

index e7b6328a27874c904cdb6954151fe4c859ff1535..1ada46e172ff65e1dc09e429d86ff11ccd3e7f69 100644 (file)
@@ -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 )