fix: 修复权限相关问题
This commit is contained in:
parent
3f9874cc81
commit
6c610b3b1b
|
@ -39,7 +39,6 @@ public class ProjectController {
|
|||
private ApiTestEnvironmentService apiTestEnvironmentService;
|
||||
|
||||
@GetMapping("/listAll")
|
||||
@RequiresPermissions(PermissionConstants.WORKSPACE_PROJECT_MANAGER_READ)
|
||||
public List<ProjectDTO> listAll() {
|
||||
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||
ProjectRequest request = new ProjectRequest();
|
||||
|
|
|
@ -668,6 +668,12 @@ public class UserService {
|
|||
if (workspaces.size() > 0) {
|
||||
String wsId = workspaces.get(0).getSourceId();
|
||||
switchUserResource("workspace", wsId);
|
||||
} else {
|
||||
// 用户登录之后没有项目和工作空间的权限就把值清空
|
||||
user.setLastWorkspaceId("");
|
||||
user.setLastProjectId("");
|
||||
updateUser(user);
|
||||
SessionUtils.putUser(SessionUser.fromUser(user));
|
||||
}
|
||||
} else {
|
||||
UserGroup userGroup = project.stream().filter(p -> StringUtils.isNotBlank(p.getSourceId()))
|
||||
|
|
Loading…
Reference in New Issue