public static boolean checkSystemPermissionGrantOption(
      String userName, PrivilegeType permission) {
    return authorityFetcher.get().checkUserSysPrivilegesGrantOpt(userName, 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