public static PathPatternTree getAuthorizedPathTree(String userName, PrivilegeType permission)
      throws AuthException {
    return authorityFetcher.get().getAuthorizedPatternTree(userName, permission);
  }
Check whether specific Session has the authorization to given plan.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java