public static int objPriToPos(PrivilegeType pri) {
    switch (pri) {
      case CREATE:
        return 0;
      case DROP:
        return 1;
      case ALTER:
        return 2;
      case SELECT:
        return 3;
      case INSERT:
        return 4;
      case DELETE:
        return 5;
      default:
        throw new RuntimeException("Not support position");
    }
  }
Transform permission from name to privilegeId

@param authorizationList the list of privilege name
@return the set of privilege type
@throws AuthException throws if there are no privilege matched
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java