public static boolean checkTablePermissionGrantOption(
      String userName, String database, String table, PrivilegeType permission) {
    return authorityFetcher
            .get()
            .checkUserTBPrivilegesGrantOpt(userName, database, table, permission)
            .getCode()
        == TSStatusCode.SUCCESS_STATUS.getStatusCode();
  }
Check whether specific Session has the authorization to given plan.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java