public static int pathPriToPos(PrivilegeType pri) {
    switch (pri) {
      case READ_DATA:
        return 0;
      case WRITE_DATA:
        return 1;
      case READ_SCHEMA:
        return 2;
      case WRITE_SCHEMA:
        return 3;
      default:
        throw new RuntimeException("Not support PrivilegeType " + pri);
    }
  }
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