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 )