You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2021/04/07 13:46:38 UTC
[shardingsphere] branch master updated: Refactor
ShardingSphereAuthority (#9979)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 02467ce Refactor ShardingSphereAuthority (#9979)
02467ce is described below
commit 02467ce54e27ee4005136b007fb1c7c79d53c7a6
Author: Liang Zhang <te...@163.com>
AuthorDate: Wed Apr 7 21:46:10 2021 +0800
Refactor ShardingSphereAuthority (#9979)
* Fix javadoc
* Refactor ShardingSphereAuthority
---
.../shardingsphere/authority/engine/ShardingSphereAuthority.java | 6 +++---
.../shardingsphere/authority/engine/impl/DefaultAuthority.java | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/ShardingSphereAuthority.java b/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/ShardingSphereAuthority.java
index e701594..ccb8945 100644
--- a/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/ShardingSphereAuthority.java
+++ b/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/ShardingSphereAuthority.java
@@ -32,15 +32,15 @@ public interface ShardingSphereAuthority {
/**
* Initialize authority.
*
- * @param loadedPrivileges loaded privileges
+ * @param loadedUserPrivilegeMap loaded map of users and privileges
*/
- void init(Map<ShardingSphereUser, ShardingSpherePrivileges> loadedPrivileges);
+ void init(Map<ShardingSphereUser, ShardingSpherePrivileges> loadedUserPrivilegeMap);
/**
* Find Privileges.
*
* @param grantee grantee
- * @return found user
+ * @return found privileges
*/
Optional<ShardingSpherePrivileges> findPrivileges(Grantee grantee);
}
diff --git a/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/impl/DefaultAuthority.java b/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/impl/DefaultAuthority.java
index 385fcc5..503fcd6 100644
--- a/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/impl/DefaultAuthority.java
+++ b/shardingsphere-features/shardingsphere-authority/shardingsphere-authority-common/src/main/java/org/apache/shardingsphere/authority/engine/impl/DefaultAuthority.java
@@ -34,8 +34,8 @@ public final class DefaultAuthority implements ShardingSphereAuthority {
private final Map<ShardingSphereUser, ShardingSpherePrivileges> userPrivilegeMap = new ConcurrentHashMap<>();
@Override
- public void init(final Map<ShardingSphereUser, ShardingSpherePrivileges> loadedPrivileges) {
- userPrivilegeMap.putAll(loadedPrivileges);
+ public void init(final Map<ShardingSphereUser, ShardingSpherePrivileges> loadedUserPrivilegeMap) {
+ userPrivilegeMap.putAll(loadedUserPrivilegeMap);
}
@Override