[ISSUE #346] fix request error when logging in using the configuration file (#347)

This commit is contained in:
Crazylychee
2025-07-16 19:21:25 +08:00
committed by GitHub
parent 9c2a069976
commit f60103af9b

View File

@@ -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);