in memory/src/java/org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java [99:127]
public synchronized void revoke(Role role, Permission permission) throws DataBackendException, UnknownEntityException
{
boolean roleExists = false;
boolean permissionExists = false;
try
{
roleExists = getRoleManager().checkExists(role);
permissionExists = getPermissionManager().checkExists(permission);
if (roleExists && permissionExists)
{
((TurbineRole) role).removePermission(permission);
((TurbinePermission) permission).removeRole(role);
return;
}
}
catch (Exception e)
{
throw new DataBackendException("revoke(Role,Permission) failed", e);
}
if (!roleExists)
{
throw new UnknownEntityException("Unknown role '" + role.getName() + "'");
}
if (!permissionExists)
{
throw new UnknownEntityException("Unknown permission '" + permission.getName() + "'");
}
}