public static boolean checkPathPrivilegeGrantOpt(
      PartialPath path, PrivilegeType priv, List<PathPrivilege> privilegeList) {
    if (privilegeList == null) {
      return false;
    }
    for (PathPrivilege pathPrivilege : privilegeList) {
      if (pathPrivilege.getPath().matchFullPath(path)
          && pathPrivilege.getPrivileges().contains(priv)
          && pathPrivilege.getGrantOpt().contains(priv)) {
        return true;
      }
    }
    return false;
  }
Check path privilege grant option

@param path series path
@param priv privilege type
@param privilegeList privileges in List structure
@return True if privilege-check passed
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java