nili 1 week ago
parent
commit
f7cf104602
  1. 4
      game-web/src/main/java/awesome/group/game/web/filter/AdminLoginFilter.java

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

Loading…
Cancel
Save