mirror of https://github.com/apache/archiva.git
reload ldapusermapper in case of configuration change
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428122 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6934942173
commit
19f3903ae1
|
@ -25,6 +25,7 @@ import org.apache.archiva.admin.model.beans.LdapConfiguration;
|
||||||
import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin;
|
import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationException;
|
import org.apache.archiva.redback.authentication.AuthenticationException;
|
||||||
import org.apache.archiva.redback.authentication.Authenticator;
|
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.LdapConnection;
|
||||||
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionConfiguration;
|
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionConfiguration;
|
||||||
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
|
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
|
||||||
|
@ -78,6 +79,9 @@ public class DefaultRedbackRuntimeConfigurationService
|
||||||
@Named(value = "cache#users")
|
@Named(value = "cache#users")
|
||||||
private Cache usersCache;
|
private Cache usersCache;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private LdapUserMapper ldapUserMapper;
|
||||||
|
|
||||||
|
|
||||||
public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
|
public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
|
||||||
throws ArchivaRestServiceException
|
throws ArchivaRestServiceException
|
||||||
|
@ -149,6 +153,9 @@ public class DefaultRedbackRuntimeConfigurationService
|
||||||
usersCache.setMaxElementsOnDisk(
|
usersCache.setMaxElementsOnDisk(
|
||||||
redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() );
|
redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() );
|
||||||
|
|
||||||
|
|
||||||
|
ldapUserMapper.initialize();
|
||||||
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
catch ( AuthenticationException e )
|
catch ( AuthenticationException e )
|
||||||
|
|
Loading…
Reference in New Issue