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