This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 0110b34f041 fix the failure message of permission check (#16977)
0110b34f041 is described below

commit 0110b34f0415c2f23ae8b80a07d28d245a063fa8
Author: shuwenwei <[email protected]>
AuthorDate: Sun Jan 4 17:39:44 2026 +0800

    fix the failure message of permission check (#16977)
---
 .../plan/relational/security/TreeAccessCheckVisitor.java       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

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 4daa322d58e..e8ec61c206e 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 class TreeAccessCheckVisitor extends 
StatementVisitor<TSStatus, TreeAcces
         }
         return checkPermissionsWithGrantOption(
             context,
+            authorType,
             Arrays.stream(statement.getPrivilegeList())
                 .map(s -> PrivilegeType.valueOf(s.toUpperCase()))
                 .collect(Collectors.toList()),
@@ -1980,7 +1981,10 @@ public class TreeAccessCheckVisitor extends 
StatementVisitor<TSStatus, TreeAcces
   }
 
   protected TSStatus checkPermissionsWithGrantOption(
-      IAuditEntity auditEntity, List<PrivilegeType> privilegeList, 
List<PartialPath> paths) {
+      IAuditEntity auditEntity,
+      AuthorType authorType,
+      List<PrivilegeType> privilegeList,
+      List<PartialPath> paths) {
     Supplier<String> supplier =
         () -> {
           StringJoiner joiner = new StringJoiner(" ");
@@ -2003,7 +2007,7 @@ public class TreeAccessCheckVisitor extends 
StatementVisitor<TSStatus, TreeAcces
               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 @@ public class TreeAccessCheckVisitor extends 
StatementVisitor<TSStatus, TreeAcces
               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;
         }

Reply via email to