This is an automated email from the ASF dual-hosted git repository.
cdutz 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 4da4fd80a72 feat: Refactored the visibility of some methods to make it
possible to add BasicAuthorizer implementations in other packages. (#12195)
4da4fd80a72 is described below
commit 4da4fd80a723f0b9222df54c33951e91c4f9943c
Author: Christofer Dutz <[email protected]>
AuthorDate: Tue Mar 26 16:47:40 2024 +0100
feat: Refactored the visibility of some methods to make it possible to add
BasicAuthorizer implementations in other packages. (#12195)
---
.../org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java | 4 ++--
.../org/apache/iotdb/commons/auth/authorizer/LocalFileAuthorizer.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
index 7ccc17e33c6..4852ceee3e8 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
@@ -69,7 +69,7 @@ public abstract class BasicAuthorizer implements IAuthorizer,
IService {
// FOR PRE VERSION END -----
- BasicAuthorizer(IUserManager userManager, IRoleManager roleManager) throws
AuthException {
+ public BasicAuthorizer(IUserManager userManager, IRoleManager roleManager)
throws AuthException {
this.userManager = userManager;
this.roleManager = roleManager;
}
@@ -113,7 +113,7 @@ public abstract class BasicAuthorizer implements
IAuthorizer, IService {
}
/** Checks if a user has admin privileges */
- abstract boolean isAdmin(String username);
+ protected abstract boolean isAdmin(String username);
@Override
public boolean login(String username, String password) throws AuthException {
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/LocalFileAuthorizer.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/LocalFileAuthorizer.java
index cf1d8ec56da..8eead3eceb8 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/LocalFileAuthorizer.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/LocalFileAuthorizer.java
@@ -35,7 +35,7 @@ public class LocalFileAuthorizer extends BasicAuthorizer {
}
@Override
- boolean isAdmin(String username) {
+ protected boolean isAdmin(String username) {
return config.getAdminName().equals(username);
}
}