fix: 修复权限相关问题
This commit is contained in:
parent
08afbf3cdc
commit
c820afaf00
|
@ -689,7 +689,17 @@ public class UserService {
|
|||
List<UserGroup> projectUserGroups = user.getUserGroups().stream()
|
||||
.filter(ug -> StringUtils.equals(user.getLastProjectId(), ug.getSourceId()))
|
||||
.collect(Collectors.toList());
|
||||
return CollectionUtils.isNotEmpty(projectUserGroups);
|
||||
if (CollectionUtils.isNotEmpty(projectUserGroups)) {
|
||||
Project project = projectMapper.selectByPrimaryKey(user.getLastProjectId());
|
||||
if (StringUtils.equals(project.getWorkspaceId(), user.getLastWorkspaceId())) {
|
||||
return true;
|
||||
}
|
||||
// last_project_id 和 last_workspace_id 对应不上了
|
||||
user.setLastWorkspaceId(project.getWorkspaceId());
|
||||
updateUser(user);
|
||||
SessionUtils.putUser(SessionUser.fromUser(user));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue