diff --git a/backend/src/main/java/io/metersphere/controller/ProjectController.java b/backend/src/main/java/io/metersphere/controller/ProjectController.java index 71723e7d2e..9daf139dcc 100644 --- a/backend/src/main/java/io/metersphere/controller/ProjectController.java +++ b/backend/src/main/java/io/metersphere/controller/ProjectController.java @@ -23,8 +23,10 @@ public class ProjectController { @GetMapping("/listAll") public List listAll() { - // todo: 限制workspace和org - return projectService.listAll(); + String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); + ProjectRequest request = new ProjectRequest(); + request.setWorkspaceId(currentWorkspaceId); + return projectService.getProjectList(request); } @PostMapping("/add")