aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-02-11 17:13:39 +0000
committerOlivier Lamy <olamy@apache.org>2013-02-11 17:13:39 +0000
commit317934b70945bf77e8bc50deb93dbdda6e554be8 (patch)
treeb2e1b0269aeaad68708d0cfeb0fe8e3527340621 /archiva-modules/archiva-web
parente8622273da21185ba49c5adc189a340afbcf3923 (diff)
downloadarchiva-317934b70945bf77e8bc50deb93dbdda6e554be8.tar.gz
archiva-317934b70945bf77e8bc50deb93dbdda6e554be8.zip
verify ldap groups dn too
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1444882 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java15
1 files changed, 14 insertions, 1 deletions
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 1752aad0d..e6694dc90 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
@@ -151,7 +151,6 @@ public class DefaultRedbackRuntimeConfigurationService
usersCache.setMaxElementsOnDisk(
redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() );
-
ldapUserMapper.initialize();
return Boolean.TRUE;
@@ -237,6 +236,20 @@ public class DefaultRedbackRuntimeConfigurationService
toProperties( ldapConfiguration.getExtraProperties() ) );
ldapConnection = ldapConnectionFactory.getConnection( ldapConnectionConfiguration );
+
+ ldapConnection.close();
+
+ // verify groups dn value too
+
+ ldapConnectionConfiguration =
+ new LdapConnectionConfiguration( ldapConfiguration.getHostName(), ldapConfiguration.getPort(),
+ ldapConfiguration.getBaseGroupsDn(),
+ ldapConfiguration.getContextFactory(), ldapConfiguration.getBindDn(),
+ ldapConfiguration.getPassword(),
+ ldapConfiguration.getAuthenticationMethod(),
+ toProperties( ldapConfiguration.getExtraProperties() ) );
+
+ ldapConnection = ldapConnectionFactory.getConnection( ldapConnectionConfiguration );
}
catch ( InvalidNameException e )
{