public static boolean hasPrivilegeToRevoke(
      PartialPath path, PrivilegeType priv, List<PathPrivilege> privilegeList) {
    for (PathPrivilege pathPrivilege : privilegeList) {
      if (path.matchFullPath(pathPrivilege.getPath())
          && pathPrivilege.getPrivileges().contains(priv)) {
        return true;
      }
    }
    return false;
  }
Check if series path has this privilege to revoke

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