]> source.dussan.org Git - archiva.git/commitdiff
ensure using default role names when configured
authorOlivier Lamy <olamy@apache.org>
Mon, 21 Jan 2013 23:11:33 +0000 (23:11 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 21 Jan 2013 23:11:33 +0000 (23:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1436685 13f79535-47bb-0310-9956-ffa450edef68

redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java

index 921868c76ffdfd9f311333a397a96ce0e03c6a12..722ebcafff8d54fdeb5e21962b68cb518ba7d395 100644 (file)
@@ -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<String>( roles );
@@ -800,7 +807,6 @@ public class DefaultLdapRoleMapper
     }
 
 
-
     public String getUserIdAttribute()
     {
         return userIdAttribute;