You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2024/04/18 04:39:33 UTC

(iotdb) branch ty/openShowVariables created (now 55e21580826)

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

jackietien pushed a change to branch ty/openShowVariables
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 55e21580826 [IOTDB-6322] Let show variables can be executed by anyone

This branch includes the following new commits:

     new 55e21580826 [IOTDB-6322] Let show variables can be executed by anyone

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: [IOTDB-6322] Let show variables can be executed by anyone

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

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

commit 55e21580826ac6ef78cae045ef0d028db1df55a5
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Thu Apr 18 12:39:21 2024 +0800

    [IOTDB-6322] Let show variables can be executed by anyone
---
 .../plan/statement/metadata/ShowVariablesStatement.java          | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/ShowVariablesStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/ShowVariablesStatement.java
index be5c1f255e4..f8863fa2f12 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/ShowVariablesStatement.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/ShowVariablesStatement.java
@@ -20,8 +20,6 @@
 package org.apache.iotdb.db.queryengine.plan.statement.metadata;
 
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.auth.entity.PrivilegeType;
-import org.apache.iotdb.db.auth.AuthorityChecker;
 import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
 import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
 import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
@@ -36,12 +34,7 @@ public class ShowVariablesStatement extends ShowStatement implements IConfigStat
 
   @Override
   public TSStatus checkPermissionBeforeProcess(String userName) {
-    if (AuthorityChecker.SUPER_USER.equals(userName)) {
-      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
-    }
-    return AuthorityChecker.getTSStatus(
-        AuthorityChecker.checkSystemPermission(userName, PrivilegeType.MAINTAIN.ordinal()),
-        PrivilegeType.MAINTAIN);
+    return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
   }
 
   @Override