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 62a4efca132 fix root don't need to check
new 5c0a52f718f Merge branch 'auth' of https://github.com/apache/iotdb
into auth
62a4efca132 is described below
commit 62a4efca132583deb3595bcad598e9fad11f302f
Author: JackieTien97 <[email protected]>
AuthorDate: Mon Sep 4 14:08:36 2023 +0800
fix root don't need to check
---
.../queryengine/plan/statement/AuthorityInformationStatement.java | 6 ++++--
.../java/org/apache/iotdb/commons/auth/user/BasicUserManager.java | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/AuthorityInformationStatement.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/AuthorityInformationStatement.java
index f27a144530e..3ed7e3bfbbb 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/AuthorityInformationStatement.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/AuthorityInformationStatement.java
@@ -36,8 +36,10 @@ public abstract class AuthorityInformationStatement extends
Statement {
@Override
public TSStatus checkPermissionBeforeProcess(String userName) {
try {
- this.authorityScope =
- AuthorityChecker.getAuthorizedPathTree(userName,
PrivilegeType.READ_SCHEMA.ordinal());
+ if (!AuthorityChecker.SUPER_USER.equals(userName)) {
+ this.authorityScope =
+ AuthorityChecker.getAuthorizedPathTree(userName,
PrivilegeType.READ_SCHEMA.ordinal());
+ }
} catch (AuthException e) {
return new TSStatus(e.getCode().getStatusCode());
}
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/user/BasicUserManager.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/user/BasicUserManager.java
index dedd5f4b41a..93f0a976e5f 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/user/BasicUserManager.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/user/BasicUserManager.java
@@ -157,7 +157,7 @@ public abstract class BasicUserManager implements
IUserManager {
@Override
public boolean revokePrivilegeFromUser(String username, PartialPath path,
int privilegeId)
throws AuthException {
- AuthUtils.validatePrivilege(path, privilegeId);
+ // AuthUtils.validatePrivilege(path, privilegeId);
lock.writeLock(username);
try {
User user = getUser(username);