Merge branch 'v1.4' into master

This commit is contained in:
Captain.B 2020-10-23 15:24:11 +08:00
commit 9b3b8739eb
2 changed files with 17 additions and 8 deletions

View File

@ -320,6 +320,10 @@ public class UserService {
public void updateUser(User user) { public void updateUser(User user) {
user.setUpdateTime(System.currentTimeMillis()); user.setUpdateTime(System.currentTimeMillis());
userMapper.updateByPrimaryKeySelective(user); userMapper.updateByPrimaryKeySelective(user);
// 禁用用户之后剔除在线用户
if (StringUtils.equals(user.getStatus(), UserStatus.DISABLED)) {
SessionUtils.kickOutUser(user.getId());
}
} }
public void switchUserRole(String sign, String sourceId) { public void switchUserRole(String sign, String sourceId) {

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true"> <configuration debug="true">
<property resource="application.properties"/> <property resource="application.properties"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <property file="/opt/metersphere/conf/metersphere.properties"/>
<encoder> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<pattern>%d %5p %40.40c:%4L - %m%n</pattern> <encoder>
</encoder> <pattern>%d %5p %40.40c:%4L - %m%n</pattern>
</appender> </encoder>
</appender>
<appender name="debugAppender" <appender name="debugAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender"> class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>DEBUG</level> <level>DEBUG</level>
<onMatch>ACCEPT</onMatch> <onMatch>ACCEPT</onMatch>
@ -142,7 +143,7 @@
<root level="INFO"> <root level="INFO">
<appender-ref ref="infoAsyncAppender" /> <appender-ref ref="infoAsyncAppender" />
<appender-ref ref="console" /> <appender-ref ref="console"/>
</root> </root>
<logger name="io.metersphere" additivity="false"> <logger name="io.metersphere" additivity="false">
@ -152,6 +153,10 @@
<appender-ref ref="errorAsyncAppender"/> <appender-ref ref="errorAsyncAppender"/>
</logger> </logger>
<logger name="io.metersphere.base.mapper" level="${logger.sql.level:ERROR}">
<appender-ref ref="console"/>
</logger>
<logger name="io.metersphere.Application" additivity="false" level="${logger.level:INFO}"> <logger name="io.metersphere.Application" additivity="false" level="${logger.level:INFO}">
<appender-ref ref="infoAsyncAppender"/> <appender-ref ref="infoAsyncAppender"/>
</logger> </logger>