public static Set<PrivilegeType> getPrivileges(
      PartialPath path, List<PathPrivilege> privilegeList) {
    if (privilegeList == null) {
      return new HashSet<>();
    }
    Set<PrivilegeType> privileges = new HashSet<>();
    for (PathPrivilege pathPrivilege : privilegeList) {
      if (pathPrivilege.getPath().matchFullPath(path)) {
        for (Integer item : pathPrivilege.getPrivilegeIntSet()) {
          privileges.add(PrivilegeType.values()[item]);
        }
      }
    }
    return privileges;
  }
Get privileges

@param path The seriesPath on which the privileges take effect.
@return The privileges granted to the role
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java