Source:
protected boolean isUserAuthorizedToRunAction() { if (isInternalExecution()) { if (log.isDebugEnabled()) { log.debugFormat("Permission check skipped for internal action {0}.", getActionType()); } return true; } if (!MultiLevelAdministrationHandler.isMultilevelAdministrationOn()) { if (log.isDebugEnabled()) { log.debugFormat("Permission check for action {0} skipped because multilevel administration is disabled.", getActionType()); } return true; } if (getCurrentUser() == null) { addCanDoActionMessage(VdcBllMessages.USER_IS_NOT_LOGGED_IN); return false; } final List<PermissionSubject> permSubjects = getPermissionCheckSubjects(); if (permSubjects == null || permSubjects.isEmpty()) { if (log.isDebugEnabled()) { log.debugFormat("The set of objects to check is null or empty for action {0}.", getActionType()); } addCanDoActionMessage(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION); return false; } if (!VdcActionType.QuotaDependency.NONE.equals(getActionType().getQuotaDependency())) { addQuotaPermissionSubject(permSubjects); } for (PermissionSubject permSubject : permSubjects) { final Guid objectId = permSubject.getObjectId(); final VdcObjectType objectType = permSubject.getObjectType(); final ActionGroup objectActionGroup = permSubject.getActionGroup(); if (objectId == null) { if (log.isDebugEnabled()) { log.debugFormat("The object to check is null for action {0}.", getActionType()); } addCanDoActionMessage(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION); return false; } if (objectActionGroup == null) { if (log.isDebugEnabled()) { log.debugFormat("No action group is defined for action {0}.", getActionType()); } return false; } if (!checkUserAuthorization(getCurrentUser().getUserId(), objectActionGroup, objectId, objectType)) { addCanDoActionMessage(permSubject.getMessage()); return false; } } return true; }

Target:
protected boolean isUserAuthorizedToRunAction() { if (isInternalExecution()) { if (log.isDebugEnabled()) { log.debugFormat("Permission check skipped for internal action {0}.", getActionType()); } return true; } if (!MultiLevelAdministrationHandler.isMultilevelAdministrationOn()) { if (log.isDebugEnabled()) { log.debugFormat("Permission check for action {0} skipped because multilevel administration is disabled.", getActionType()); } return true; } if (getCurrentUser() == null) { addCanDoActionMessage(VdcBllMessages.USER_IS_NOT_LOGGED_IN); return false; } final List<PermissionSubject> permSubjects = getPermissionCheckSubjects(); if (permSubjects == null || permSubjects.isEmpty()) { if (log.isDebugEnabled()) { log.debugFormat("The set of objects to check is null or empty for action {0}.", getActionType()); } addCanDoActionMessage(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION); return false; } if (isQuotaDependant()) { addQuotaPermissionSubject(permSubjects); } for (PermissionSubject permSubject : permSubjects) { final Guid objectId = permSubject.getObjectId(); final VdcObjectType objectType = permSubject.getObjectType(); final ActionGroup objectActionGroup = permSubject.getActionGroup(); if (objectId == null) { if (log.isDebugEnabled()) { log.debugFormat("The object to check is null for action {0}.", getActionType()); } addCanDoActionMessage(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION); return false; } if (objectActionGroup == null) { if (log.isDebugEnabled()) { log.debugFormat("No action group is defined for action {0}.", getActionType()); } return false; } if (!checkUserAuthorization(getCurrentUser().getUserId(), objectActionGroup, objectId, objectType)) { addCanDoActionMessage(permSubject.getMessage()); return false; } } return true; }