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

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


The following commit(s) were added to refs/heads/auth by this push:
     new 5a363ba714f fix list
5a363ba714f is described below

commit 5a363ba714fb6a141fe913c5c9f60ab61f746118
Author: JackieTien97 <[email protected]>
AuthorDate: Wed Sep 6 17:38:25 2023 +0800

    fix list
---
 .../main/java/org/apache/iotdb/db/auth/AuthorityChecker.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
index 961d6d99b46..c08d6f0c0fb 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
@@ -202,20 +202,19 @@ public class AuthorityChecker {
       TAuthorizerResp authResp, SettableFuture<ConfigTaskResult> future) {
     List<TSDataType> types = new ArrayList<>();
     boolean listRoleUser = false;
-    int columnNum = 0;
     if (authResp.tag.equals(IoTDBConstant.COLUMN_ROLE)
         || authResp.tag.equals(IoTDBConstant.COLUMN_USER)) {
       // if list role/user, just return 1 column.
-      columnNum = 1;
       listRoleUser = true;
+      types.add(TSDataType.TEXT);
     } else {
       // if list privilege, return : rolename, path, privilege, grant option
-      columnNum = 4;
-    }
-
-    for (int i = 0; i < columnNum; i++) {
       types.add(TSDataType.TEXT);
+      types.add(TSDataType.TEXT);
+      types.add(TSDataType.TEXT);
+      types.add(TSDataType.BOOLEAN);
     }
+
     TsBlockBuilder builder = new TsBlockBuilder(types);
     List<ColumnHeader> headerList = new ArrayList<>();
 

Reply via email to