From: Olivier Lamy Date: Mon, 21 Jan 2013 23:11:33 +0000 (+0000) Subject: ensure using default role names when configured X-Git-Tag: redback-2.1~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=26afe7802f4fa90ed4d3e8273b21ef74c302902d;p=archiva.git ensure using default role names when configured git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1436685 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java index 921868c76..722ebcaff 100644 --- a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java +++ b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java @@ -57,7 +57,7 @@ import java.util.Set; * @author Olivier Lamy * @since 2.1 */ -@Service( "ldapRoleMapper#default" ) +@Service("ldapRoleMapper#default") public class DefaultLdapRoleMapper implements LdapRoleMapper { @@ -68,7 +68,7 @@ public class DefaultLdapRoleMapper private LdapConnectionFactory ldapConnectionFactory; @Inject - @Named( value = "userConfiguration#default" ) + @Named(value = "userConfiguration#default") private UserConfiguration userConf; //--------------------------- @@ -414,6 +414,13 @@ public class DefaultLdapRoleMapper roles.add( role ); } } + else + { + if ( this.useDefaultRoleName ) + { + roles.add( group ); + } + } } return new ArrayList( roles ); @@ -800,7 +807,6 @@ public class DefaultLdapRoleMapper } - public String getUserIdAttribute() { return userIdAttribute;