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