From 1eb9c1f8e6aa74bca4bc28ad7c6873cc395426e0 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 6 Apr 2022 17:53:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98=E5=8F=AA=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=89=80=E5=B1=9E=E7=A9=BA=E9=97=B4=E7=9A=84=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1006218 --user=李玉号 项目添加成员只展示所属空间的成员列表 https://www.tapd.cn/55049933/s/1130533 --- .../java/io/metersphere/controller/UserController.java | 8 ++++++++ .../src/business/components/project/menu/EditMember.vue | 7 ++++++- .../src/business/components/settings/common/AddMember.vue | 8 +++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java index 7796b046e2..f0b5f355ef 100644 --- a/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/backend/src/main/java/io/metersphere/controller/UserController.java @@ -158,12 +158,20 @@ public class UserController { return userService.getMemberList(request); } + @GetMapping("/ws/current/member/list") + public List getCurrentWorkspaceMember() { + QueryMemberRequest request = new QueryMemberRequest(); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return userService.getMemberList(request); + } + /** * 添加工作空间成员 */ @PostMapping("/ws/member/add") @MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.CREATE, title = "添加工作空间成员") public void addMember(@RequestBody AddMemberRequest request) { + String wsId = request.getWorkspaceId(); // workspaceService.checkWorkspaceOwner(wsId); userService.addMember(request); diff --git a/frontend/src/business/components/project/menu/EditMember.vue b/frontend/src/business/components/project/menu/EditMember.vue index 546bc7cba4..895ceee2cc 100644 --- a/frontend/src/business/components/project/menu/EditMember.vue +++ b/frontend/src/business/components/project/menu/EditMember.vue @@ -1,5 +1,9 @@