[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Some potential error in RoleDAO
- To: openldap-fortress@openldap.org
- Subject: Some potential error in RoleDAO
- From: Emmanuel LÃcharny <elecharny@gmail.com>
- Date: Fri, 05 Jul 2013 00:58:55 +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=RK5X7KjwcsWGkGRsjFwRlWa3KZLBXqh+Qad56swmBjc=; b=vVkJ4LHZqKVlf/WbB0Kyvx9k/rjHeex4rDNkS4sL+0UxWGlSG8K6YM3IigkfC5PvLH VYw4XkgmsjV94HKnSbFR4WzfJ8bmjdIInGckjH3zUdTYBB/i9mjkJCxY1tBs3mMk51mF Gf9sfssPKywwJBBIS/5GOwRiEoOjwLwCse2wZ23zuAiWTy46xjwzJ3TPmttGgr+kAKAh rkLybQu64zgvbQYj1+XahhlBX5QepwgO8HLbqbeaED/0msXPtGDSrf2QSihR3kMVIhyv u7FGDFGV+SLHeaQSxJoV7WA36J/8mIGy1ruH62NocweUm8mwWnLQ5rrIlIQ5VqVmMEAS lLow==
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
I'm not 100% sure, bt it seems that the update() method in RoleDAO is
not correct :
public final Role update( Role entity )
throws UpdateException
{
...
try
{
...
if ( VUtil.isNotNullOrEmpty( entity.getOccupants() ) )
{
for ( String name : entity.getOccupants() )
{
LDAPAttribute occupant = new LDAPAttribute(
ROLE_OCCUPANT, name );
mods.add( LDAPModification.REPLACE, occupant );
}
Here, I think that the ROLE_OCCUPENT Attribute will only contain the
last name, when it should contain all the names.
Thoughts ?
--
Regards,
Cordialement,
Emmanuel LÃcharny
www.iktek.com