From fb2c45f1e458072dec2f50496dd89addf5887073 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 23 Oct 2020 14:00:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E6=9C=AC=E5=9C=B0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=89=93=E5=8D=B0sql?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改 /opt/metersphere/conf/metershpere.properties 添加 logging.sql.level=debug --- backend/src/main/resources/logback.xml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/backend/src/main/resources/logback.xml b/backend/src/main/resources/logback.xml index 9e406c0159..becb9adf51 100644 --- a/backend/src/main/resources/logback.xml +++ b/backend/src/main/resources/logback.xml @@ -1,14 +1,15 @@ - - - - %d %5p %40.40c:%4L - %m%n - - + + + + + %d %5p %40.40c:%4L - %m%n + + + class="ch.qos.logback.core.rolling.RollingFileAppender"> DEBUG ACCEPT @@ -142,7 +143,7 @@ - + @@ -152,6 +153,10 @@ + + + + From 868ab546eff5bbbdfe89304fa3296c6ef6c190c9 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 23 Oct 2020 15:23:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E7=A6=81=E7=94=A8=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B9=8B=E5=90=8E=E5=89=94=E9=99=A4=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/service/UserService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 6da6a242ff..6a20ed42c3 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -320,6 +320,10 @@ public class UserService { public void updateUser(User user) { user.setUpdateTime(System.currentTimeMillis()); userMapper.updateByPrimaryKeySelective(user); + // 禁用用户之后,剔除在线用户 + if (StringUtils.equals(user.getStatus(), UserStatus.DISABLED)) { + SessionUtils.kickOutUser(user.getId()); + } } public void switchUserRole(String sign, String sourceId) {