]> source.dussan.org Git - archiva.git/commitdiff
fix user dn when adding user to a group
authorOlivier Lamy <olamy@apache.org>
Mon, 21 Jan 2013 22:43:45 +0000 (22:43 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 21 Jan 2013 22:43:45 +0000 (22:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1436673 13f79535-47bb-0310-9956-ffa450edef68

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

index eb22ec2e446d130a777dd18038273a8bce486634..950570a672b54698875900000e7ca9eeec98e133 100644 (file)
@@ -585,13 +585,13 @@ public class DefaultLdapRoleMapper
                 {
                     BasicAttribute basicAttribute = new BasicAttribute( "uniquemember" );
                     basicAttribute.add( this.userIdAttribute + "=" + username + "," + getGroupsDn() );
-                    context.modifyAttributes( "cn=" + groupName + "," + getGroupsDn(), new ModificationItem[]{
+                    context.modifyAttributes( "cn=" + groupName + "," + getBaseDn(), new ModificationItem[]{
                         new ModificationItem( DirContext.ADD_ATTRIBUTE, basicAttribute ) } );
                 }
                 else
                 {
                     attribute.add( this.userIdAttribute + "=" + username + "," + getGroupsDn() );
-                    context.modifyAttributes( "cn=" + groupName + "," + getGroupsDn(), new ModificationItem[]{
+                    context.modifyAttributes( "cn=" + groupName + "," + getBaseDn(), new ModificationItem[]{
                         new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attribute ) } );
                 }
                 return true;