mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-10 19:48:29 +08:00
This commit is contained in:
@@ -80,7 +80,7 @@ public class MQAdminAspect {
|
|||||||
String methodName = joinPoint.getSignature().getName();
|
String methodName = joinPoint.getSignature().getName();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (isPoolConfigIsolatedByUser(rmqConfigure.isLoginRequired(), methodName)) {
|
if (isPoolConfigIsolatedByUser(rmqConfigure.isLoginRequired(), rmqConfigure.getAuthMode(), methodName)) {
|
||||||
currentUserInfo = (UserInfo) UserInfoContext.get(WebUtil.USER_NAME);
|
currentUserInfo = (UserInfo) UserInfoContext.get(WebUtil.USER_NAME);
|
||||||
// 2. Borrow the user-specific MQAdminExt instance.
|
// 2. Borrow the user-specific MQAdminExt instance.
|
||||||
// currentUser.getName() is assumed to be the AccessKey, and currentUser.getPassword() is SecretKey.
|
// currentUser.getName() is assumed to be the AccessKey, and currentUser.getPassword() is SecretKey.
|
||||||
@@ -123,8 +123,8 @@ public class MQAdminAspect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPoolConfigIsolatedByUser(boolean loginRequired, String methodName) {
|
private boolean isPoolConfigIsolatedByUser(boolean loginRequired, String authMode, String methodName) {
|
||||||
if (!loginRequired) {
|
if (!loginRequired || authMode.equals("file")) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return !METHODS_TO_CHECK.contains(methodName);
|
return !METHODS_TO_CHECK.contains(methodName);
|
||||||
|
Reference in New Issue
Block a user