case ResourceAdmin:
owner = getOwner(resourceID, connection);
if (Utils.isSameDN(owner, user) || groupManager.isAdminUser(user)) {
return true;
} else {
throw new XregistryException(action
+ " is a Admin Operation, and only owner of " + resourceID
+ " is allowed ");
}
case SysAdmin:
if (groupManager.isAdminUser(user)) {
return true;
} else {
throw new XregistryException(action + " is a Admin operation but user " + user
+ " is not an adminsitrator");
}
case Write:
return verifyWriteAccesses(user, resourceID, action, connection);
default:
throw new XregistryException("User " + user
+ " is not authorized to a perform this action " + action);
}
} finally {
context.closeConnection(connection);
}