From: Olivier Lamy Date: Sat, 5 Jan 2013 17:57:45 +0000 (+0000) Subject: support more than one value for user manager impls from security.properties X-Git-Tag: archiva-1.4-M4~313 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=007258a9ed467c63d5bb88a98796c9c26ba1b891;p=archiva.git support more than one value for user manager impls from security.properties git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1429339 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java index 3c12a2e84..a4fea1b36 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java @@ -46,7 +46,7 @@ import java.util.List; * @author Olivier Lamy * @since 1.4-M4 */ -@Service( "userConfiguration#archiva" ) +@Service("userConfiguration#archiva") public class DefaultRedbackRuntimeConfigurationAdmin implements RedbackRuntimeConfigurationAdmin, UserConfiguration { @@ -57,11 +57,11 @@ public class DefaultRedbackRuntimeConfigurationAdmin private ArchivaConfiguration archivaConfiguration; @Inject - @Named( value = "userConfiguration#redback" ) + @Named(value = "userConfiguration#redback") UserConfiguration userConfiguration; @Inject - @Named( value = "cache#users" ) + @Named(value = "cache#users") private Cache usersCache; @PostConstruct @@ -78,7 +78,18 @@ public class DefaultRedbackRuntimeConfigurationAdmin String userManagerImpl = userConfiguration.getString( UserConfigurationKeys.USER_MANAGER_IMPL ); if ( StringUtils.isNotEmpty( userManagerImpl ) ) { - redbackRuntimeConfiguration.getUserManagerImpls().add( userManagerImpl ); + if ( StringUtils.contains( userManagerImpl, ',' ) ) + { + String[] impls = StringUtils.split( userManagerImpl, ',' ); + for ( String impl : impls ) + { + redbackRuntimeConfiguration.getUserManagerImpls().add( impl ); + } + } + else + { + redbackRuntimeConfiguration.getUserManagerImpls().add( userManagerImpl ); + } } // now ldap