@Override
public UserAssignment getUserAssignment( String principal )
throws RbacObjectNotFoundException, RbacManagerException
{
UserAssignment el = userAssignmentsCache.get( principal );
if ( el != null )
{
return el;
}
UserAssignment ua = null;
Exception lastException = null;
for ( RBACManager rbacManager : rbacManagersPerId.values() )
{
try
{
if ( ua == null )
{
ua = rbacManager.getUserAssignment( principal );
}
else
{
UserAssignment userAssignment = rbacManager.getUserAssignment( principal );
if ( userAssignment != null )
{
for ( String roleName : userAssignment.getRoleNames() )
{
ua.addRoleName( roleName );
}
}
}