diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml
index 4646822dc2..371914ebe9 100644
--- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml
+++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml
@@ -5,8 +5,14 @@
diff --git a/backend/src/main/java/io/metersphere/controller/GroupController.java b/backend/src/main/java/io/metersphere/controller/GroupController.java
index ff1ed9ebbe..7c18632f0f 100644
--- a/backend/src/main/java/io/metersphere/controller/GroupController.java
+++ b/backend/src/main/java/io/metersphere/controller/GroupController.java
@@ -10,6 +10,7 @@ import io.metersphere.commons.constants.OperLogModule;
import io.metersphere.commons.constants.PermissionConstants;
import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager;
+import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.GroupRequest;
import io.metersphere.controller.request.group.EditGroupRequest;
import io.metersphere.controller.request.group.EditGroupUserRequest;
@@ -17,6 +18,7 @@ import io.metersphere.dto.GroupDTO;
import io.metersphere.dto.GroupPermissionDTO;
import io.metersphere.log.annotation.MsAuditLog;
import io.metersphere.service.GroupService;
+import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
@@ -35,13 +37,22 @@ public class GroupController {
private GroupService groupService;
@PostMapping("/get/{goPage}/{pageSize}")
- @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ, PermissionConstants.PROJECT_GROUP_READ}, logical = Logical.OR)
+ @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ}, logical = Logical.OR)
public Pager> getGroupList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody EditGroupRequest request) {
request.setGoPage(goPage);
request.setPageSize(pageSize);
return groupService.getGroupList(request);
}
+ @PostMapping("/get/current/project/{goPage}/{pageSize}")
+ @RequiresPermissions(value = {PermissionConstants.PROJECT_GROUP_READ}, logical = Logical.OR)
+ public Pager> getCurrentProjectGroupList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody EditGroupRequest request) {
+ request.setOnlyQueryCurrentProject(true);
+ request.setGoPage(goPage);
+ request.setPageSize(pageSize);
+ return groupService.getGroupList(request);
+ }
+
@GetMapping("/get/all")
public List getAllGroup() {
return groupService.getAllGroup();
@@ -117,11 +128,23 @@ public class GroupController {
}
@PostMapping("/user/{goPage}/{pageSize}")
+ @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ}, logical = Logical.OR)
public Pager> getGroupUser(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody EditGroupRequest editGroupRequest) {
Page