From f7cf104602e13ec8da6cbc177b93900897e4f7fd Mon Sep 17 00:00:00 2001 From: nili Date: Mon, 21 Oct 2024 10:33:05 +0800 Subject: [PATCH] fx --- .../java/awesome/group/game/web/filter/AdminLoginFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game-web/src/main/java/awesome/group/game/web/filter/AdminLoginFilter.java b/game-web/src/main/java/awesome/group/game/web/filter/AdminLoginFilter.java index 98f0949..4095d35 100644 --- a/game-web/src/main/java/awesome/group/game/web/filter/AdminLoginFilter.java +++ b/game-web/src/main/java/awesome/group/game/web/filter/AdminLoginFilter.java @@ -55,6 +55,7 @@ public class AdminLoginFilter implements Filter { "/api/admin/swagger/v3/api-docs" ); boolean pass = false; + boolean inOpenApi = false; Integer adminId = null; try { if (StringUtils.hasText(token)) { @@ -70,11 +71,12 @@ public class AdminLoginFilter implements Filter { for (String s : openApi) { if (path.startsWith(s)) { pass = true; + inOpenApi = true; } } if (pass) { RequestContext.initAdmin(httpRequest, (HttpServletResponse) response, adminId); - if (adminId != null) { + if (adminId != null && !inOpenApi) { MatrixAdmin admin = adminMapper.selectById(adminId); if (admin != null && admin.getDisable() > 0) { channelDisable(response);