コード例 #1
0
 /**
  * Determines if the specified principal is of type 'staff'.
  *
  * @param principal Principal to check type for.
  * @return True if the principal is of type 'staff', false otherwise.
  */
 private boolean isStaff(Entity principal) {
   return EntityNames.STAFF.equals(principal.getType());
 }
コード例 #2
0
 private boolean isStaff(String userType) {
   return userType == null || userType.isEmpty() || EntityNames.STAFF.equals(userType);
 }