From 0573290ced03fba0ab756a546485459c6cff565c Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 28 Oct 2021 17:49:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=85=B3=E9=97=AD=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0run.mode=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/security/realm/LocalRealm.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/backend/src/main/java/io/metersphere/security/realm/LocalRealm.java b/backend/src/main/java/io/metersphere/security/realm/LocalRealm.java index 9a0487823f..6214df85bf 100644 --- a/backend/src/main/java/io/metersphere/security/realm/LocalRealm.java +++ b/backend/src/main/java/io/metersphere/security/realm/LocalRealm.java @@ -37,9 +37,6 @@ public class LocalRealm extends BaseRealm { @Resource private UserService userService; - @Value("${run.mode:release}") - private String runMode; - @Override public String getName() { return "LOCAL"; @@ -71,14 +68,6 @@ public class LocalRealm extends BaseRealm { String userId = token.getUsername(); String password = String.valueOf(token.getPassword()); - if (StringUtils.equals("local", runMode)) { - UserDTO user = getUserWithOutAuthenticate(userId); - userId = user.getId(); - SessionUser sessionUser = SessionUser.fromUser(user); - SessionUtils.putUser(sessionUser); - return new SimpleAuthenticationInfo(userId, password, getName()); - } - if (StringUtils.equals(login, UserSource.LOCAL.name())) { return loginLocalMode(userId, password); }