diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java index 4daa322d58ec..e8ec61c206e7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java @@ -671,6 +671,7 @@ public TSStatus visitAuthor(AuthorStatement statement, TreeAccessCheckContext co } return checkPermissionsWithGrantOption( context, + authorType, Arrays.stream(statement.getPrivilegeList()) .map(s -> PrivilegeType.valueOf(s.toUpperCase())) .collect(Collectors.toList()), @@ -1980,7 +1981,10 @@ protected boolean checkHasGlobalAuth( } protected TSStatus checkPermissionsWithGrantOption( - IAuditEntity auditEntity, List privilegeList, List paths) { + IAuditEntity auditEntity, + AuthorType authorType, + List privilegeList, + List paths) { Supplier supplier = () -> { StringJoiner joiner = new StringJoiner(" "); @@ -2003,7 +2007,7 @@ protected TSStatus checkPermissionsWithGrantOption( AuthorityChecker.getTSStatus( false, "Has no permission to execute " - + privilegeType + + authorType + ", please ensure you have these privileges and the grant option is TRUE when granted"); break; } @@ -2014,7 +2018,7 @@ protected TSStatus checkPermissionsWithGrantOption( AuthorityChecker.getTSStatus( false, "Has no permission to execute " - + privilegeType + + authorType + ", please ensure you have these privileges and the grant option is TRUE when granted"); break; }