You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by sh...@apache.org on 2026/01/04 06:16:32 UTC

(iotdb) branch fixCheckPermissionFailureMessage created (now e88ef3967bb)

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

shuwenwei pushed a change to branch fixCheckPermissionFailureMessage
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at e88ef3967bb fix the failure message of permission check

This branch includes the following new commits:

     new e88ef3967bb fix the failure message of permission check

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/01: fix the failure message of permission check

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e88ef3967bb83e849eab5a33bb2af256cfbc30d1
Author: shuwenwei <s1...@gmail.com>
AuthorDate: Sun Jan 4 14:16:16 2026 +0800

    fix the failure message of permission check
---
 .../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;
         }