try all impls for returning a role

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1433742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-15 23:44:12 +00:00
parent 772cf2af87
commit 73840256b0
1 changed files with 10 additions and 2 deletions

View File

@ -110,8 +110,16 @@ public class ArchivaRbacManager
public Role getRole( String roleName )
throws RbacObjectNotFoundException, RbacManagerException
{
// iterate until not null ?
return getRbacManagerForCommon().getRole( roleName );
for ( RBACManager rbacManager : rbacManagersPerId.values() )
{
Role role = rbacManager.getRole( roleName );
if ( role != null )
{
return role;
}
}
log.debug( "cannot find role for name: {}", roleName );
return null;
}
public List<Role> getAllRoles()