[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Doubt about a method...
- To: openldap-fortress@openldap.org
- Subject: Doubt about a method...
- From: Emmanuel LÃcharny <elecharny@gmail.com>
- Date: Thu, 04 Jul 2013 11:56:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; bh=VU5CgVfD4PReyOGyv3rgopV2Z6u4BwD2OrpKda4is0Q=; b=w2cLNuKOJ0cbIhjMnwhoGhDXPLMkd9TkC1gHU/5QZ9pzlEk82QaSDFBKmpoFR0kvql PaSEegFpLPV7YwgK7fsHgXJhdNoZoWBpRG7gnisoGR8PmRBZd3Eg6ofpnQ0ADLZrXi1a sqcRh7w3eGTmb1BAkgcDg8jqpTRNbdKlkPdJu9xGSA46d51Ur44rplhtBs5CYMuZ3oXH mtuFswDTVBez83jxAnLb828pwTCi7gKWRGNwxnbvTY7FLKryTqyhTECtupPPYJzjw35K jG9nXsbigurQMlgeCxk0LwQyEGEamDPVUiRPS+2ex6QwANo0uzVnJ1YrZcW1bSImQARw O6ZA==
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
Hi !
I'm wonderig if there is not something wrong in the following method :
private void loadUserAdminRoles( List<UserAdminRole> list,
LDAPModificationSet mods )
{
LDAPAttribute attr = null;
LDAPAttribute attrNm = null;
if ( list != null )
{
for ( UserAdminRole userRole : list )
{
String szUserRole = userRole.getRawData();
if ( attr == null )
{
attr = new LDAPAttribute(
GlobalIds.USER_ADMINROLE_DATA, szUserRole );
attrNm = new LDAPAttribute(
GlobalIds.USER_ADMINROLE_ASSIGN, userRole.getName() );
}
else
{
attr.addValue( szUserRole );
}
}
if ( attr != null )
{
mods.add( LDAPModification.REPLACE, attr );
mods.add( LDAPModification.REPLACE, attrNm );
}
}
}
the attrNm is updated only once. Is it because the userRole.getName()
will always be the same when it comes to Admin ?
--
Regards,
Cordialement,
Emmanuel LÃcharny
www.iktek.com