Merge branch 'dev' of https://github.com/fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
96a1b0b95c
|
@ -11,6 +11,7 @@ import org.apache.shiro.authc.*;
|
||||||
import org.apache.shiro.authz.UnauthorizedException;
|
import org.apache.shiro.authz.UnauthorizedException;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -49,8 +50,8 @@ public class LoginController {
|
||||||
// 自动选中组织,工作空间
|
// 自动选中组织,工作空间
|
||||||
if (StringUtils.isBlank(user.getLastOrganizationId())) {
|
if (StringUtils.isBlank(user.getLastOrganizationId())) {
|
||||||
List<UserRole> userRoles = user.getUserRoles();
|
List<UserRole> userRoles = user.getUserRoles();
|
||||||
List<UserRole> test = userRoles.stream().filter(ur -> ur.getRoleId().indexOf("test") > -1).collect(Collectors.toList());
|
List<UserRole> test = userRoles.stream().filter(ur -> ur.getRoleId().startsWith("test")).collect(Collectors.toList());
|
||||||
List<UserRole> org = userRoles.stream().filter(ur -> ur.getRoleId().indexOf("org") > -1).collect(Collectors.toList());
|
List<UserRole> org = userRoles.stream().filter(ur -> ur.getRoleId().startsWith("org")).collect(Collectors.toList());
|
||||||
if (test.size() > 0) {
|
if (test.size() > 0) {
|
||||||
String wsId = test.get(0).getSourceId();
|
String wsId = test.get(0).getSourceId();
|
||||||
userService.switchUserRole(user, "workspace", wsId);
|
userService.switchUserRole(user, "workspace", wsId);
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
<appender-ref ref="console" />
|
<appender-ref ref="console" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
<logger name="com.fruit" additivity="false">
|
<logger name="io.metersphere" additivity="false">
|
||||||
<level value="${logger.level:INFO}" />
|
<level value="${logger.level:INFO}" />
|
||||||
<appender-ref ref="debugAsyncAppender" />
|
<appender-ref ref="debugAsyncAppender" />
|
||||||
<appender-ref ref="infoAsyncAppender" />
|
<appender-ref ref="infoAsyncAppender" />
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
<appender-ref ref="errorAsyncAppender" />
|
<appender-ref ref="errorAsyncAppender" />
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<logger name="com.fruit.peach.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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue