private boolean isAuthorisedToDisplayInList( Policy policy, User user, ProjectInstance projectInstance) { Operation operation = MetaProjectConstants.OPERATION_DISPLAY_IN_PROJECT_LIST; if (user == null) { return isWorldAllowedOperation(projectInstance, operation); } else { return isAdminUser(user) || policy.isOperationAuthorized(user, operation, projectInstance); } }
private boolean isAuthorisedToRead(Policy policy, User user, ProjectInstance projectInstance) { if (user == null) { return isWorldAllowedOperation(projectInstance, MetaProjectConstants.OPERATION_READ); } else if (isAdminUser(user)) { return true; } else return policy.isOperationAuthorized( user, MetaProjectConstants.OPERATION_READ, projectInstance); }