mirror of https://github.com/apache/archiva.git
override to check faster existence of a role
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1435285 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
09afc62ecb
commit
b711ad5ff6
|
@ -290,6 +290,29 @@ public class ArchivaRbacManager
|
|||
getRbacManagerForCommon().removeUserAssignment( userAssignment );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean roleExists( String name )
|
||||
throws RbacManagerException
|
||||
{
|
||||
boolean exists = false;
|
||||
for ( RBACManager manager : rbacManagersPerId.values() )
|
||||
{
|
||||
exists = manager.roleExists( name );
|
||||
if ( exists )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return exists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean roleExists( Role role )
|
||||
throws RbacManagerException
|
||||
{
|
||||
return roleExists( role.getName() );
|
||||
}
|
||||
|
||||
public void eraseDatabase()
|
||||
{
|
||||
log.warn( "eraseDatabase not implemented" );
|
||||
|
|
Loading…
Reference in New Issue