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
|
@ -44,7 +44,7 @@ import java.util.Map;
|
||||||
* @author Olivier Lamy
|
* @author Olivier Lamy
|
||||||
* @since 1.4-M4
|
* @since 1.4-M4
|
||||||
*/
|
*/
|
||||||
@Service( "rbacManager#archiva" )
|
@Service("rbacManager#archiva")
|
||||||
public class ArchivaRbacManager
|
public class ArchivaRbacManager
|
||||||
extends AbstractRBACManager
|
extends AbstractRBACManager
|
||||||
implements RBACManager
|
implements RBACManager
|
||||||
|
@ -290,6 +290,29 @@ public class ArchivaRbacManager
|
||||||
getRbacManagerForCommon().removeUserAssignment( userAssignment );
|
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()
|
public void eraseDatabase()
|
||||||
{
|
{
|
||||||
log.warn( "eraseDatabase not implemented" );
|
log.warn( "eraseDatabase not implemented" );
|
||||||
|
|
Loading…
Reference in New Issue