archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1436674 - /archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java
Date Mon, 21 Jan 2013 22:44:00 GMT
Author: olamy
Date: Mon Jan 21 22:44:00 2013
New Revision: 1436674

URL: http://svn.apache.org/viewvc?rev=1436674&view=rev
Log:
fix user dn when adding user to a group

Modified:
    archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java

Modified: archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java?rev=1436674&r1=1436673&r2=1436674&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java
(original)
+++ archiva/redback/redback-core/trunk/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java
Mon Jan 21 22:44:00 2013
@@ -584,14 +584,14 @@ public class DefaultLdapRoleMapper
                 if ( attribute == null )
                 {
                     BasicAttribute basicAttribute = new BasicAttribute( "uniquemember" );
-                    basicAttribute.add( this.userIdAttribute + "=" + username + "," + getGroupsDn()
);
-                    context.modifyAttributes( "cn=" + groupName + "," + getBaseDn(), new
ModificationItem[]{
+                    basicAttribute.add( this.userIdAttribute + "=" + username + "," + getBaseDn()
);
+                    context.modifyAttributes( "cn=" + groupName + "," + getGroupsDn(), new
ModificationItem[]{
                         new ModificationItem( DirContext.ADD_ATTRIBUTE, basicAttribute )
} );
                 }
                 else
                 {
-                    attribute.add( this.userIdAttribute + "=" + username + "," + getGroupsDn()
);
-                    context.modifyAttributes( "cn=" + groupName + "," + getBaseDn(), new
ModificationItem[]{
+                    attribute.add( this.userIdAttribute + "=" + username + "," + getBaseDn()
);
+                    context.modifyAttributes( "cn=" + groupName + "," + getGroupsDn(), new
ModificationItem[]{
                         new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attribute ) }
);
                 }
                 return true;



Mime
View raw message