public static int sysPriToPos(PrivilegeType priv) {
    switch (priv) {
      case MANAGE_DATABASE:
        return 0;
      case MANAGE_USER:
        return 1;
      case MANAGE_ROLE:
        return 2;
      case USE_TRIGGER:
        return 3;
      case USE_UDF:
        return 4;
      case USE_CQ:
        return 5;
      case USE_PIPE:
        return 6;
      case EXTEND_TEMPLATE:
        return 7;
      case MAINTAIN:
        return 8;
      case USE_MODEL:
        return 9;
      default:
        return -1;
    }
  }
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