fix(系统设置): 修复只有系统用户权限不能查看用户的问题

--bug=1007863 --user=刘瑞斌 【系统设置】有系统 - 用户 菜单的权限,查看菜单有报错 https://www.tapd.cn/55049933/s/1071008
This commit is contained in:
CaptainB 2021-11-20 15:57:28 +08:00 committed by 刘瑞斌
parent a29e9eca20
commit fb620bbe76
1 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ public class GroupController {
private GroupService groupService; private GroupService groupService;
@PostMapping("/get/{goPage}/{pageSize}") @PostMapping("/get/{goPage}/{pageSize}")
@RequiresPermissions(value= {PermissionConstants.SYSTEM_GROUP_READ,PermissionConstants.PROJECT_GROUP_READ}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ, PermissionConstants.PROJECT_GROUP_READ}, logical = Logical.OR)
public Pager<List<GroupDTO>> getGroupList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody EditGroupRequest request) { public Pager<List<GroupDTO>> getGroupList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody EditGroupRequest request) {
request.setGoPage(goPage); request.setGoPage(goPage);
request.setPageSize(pageSize); request.setPageSize(pageSize);
@ -47,13 +47,13 @@ public class GroupController {
} }
@PostMapping("/get") @PostMapping("/get")
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ, PermissionConstants.SYSTEM_USER_READ}, logical = Logical.OR)
public List<Group> getGroupByType(@RequestBody EditGroupRequest request) { public List<Group> getGroupByType(@RequestBody EditGroupRequest request) {
return groupService.getGroupByType(request); return groupService.getGroupByType(request);
} }
@PostMapping("/add") @PostMapping("/add")
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_CREATE , PermissionConstants.PROJECT_GROUP_READ_CREATE}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_CREATE, PermissionConstants.PROJECT_GROUP_READ_CREATE}, logical = Logical.OR)
@MsAuditLog(module = "group_permission", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class) @MsAuditLog(module = "group_permission", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
public Group addGroup(@RequestBody EditGroupRequest request) { public Group addGroup(@RequestBody EditGroupRequest request) {
request.setId(UUID.randomUUID().toString()); request.setId(UUID.randomUUID().toString());
@ -61,14 +61,14 @@ public class GroupController {
} }
@PostMapping("/edit") @PostMapping("/edit")
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_EDIT , PermissionConstants.PROJECT_GROUP_READ_EDIT}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_EDIT, PermissionConstants.PROJECT_GROUP_READ_EDIT}, logical = Logical.OR)
@MsAuditLog(module = "group_permission", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class) @MsAuditLog(module = "group_permission", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
public void editGroup(@RequestBody EditGroupRequest request) { public void editGroup(@RequestBody EditGroupRequest request) {
groupService.editGroup(request); groupService.editGroup(request);
} }
@GetMapping("/delete/{id}") @GetMapping("/delete/{id}")
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_DELETE , PermissionConstants.PROJECT_GROUP_READ_DELETE}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_DELETE, PermissionConstants.PROJECT_GROUP_READ_DELETE}, logical = Logical.OR)
@MsAuditLog(module = "group_permission", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = GroupService.class) @MsAuditLog(module = "group_permission", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = GroupService.class)
public void deleteGroup(@PathVariable String id) { public void deleteGroup(@PathVariable String id) {
groupService.deleteGroup(id); groupService.deleteGroup(id);
@ -80,7 +80,7 @@ public class GroupController {
} }
@PostMapping("/permission/edit") @PostMapping("/permission/edit")
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_SETTING_PERMISSION , PermissionConstants.PROJECT_GROUP_READ_SETTING_PERMISSION}, logical = Logical.OR) @RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_SETTING_PERMISSION, PermissionConstants.PROJECT_GROUP_READ_SETTING_PERMISSION}, logical = Logical.OR)
public void editGroupPermission(@RequestBody EditGroupRequest editGroupRequest) { public void editGroupPermission(@RequestBody EditGroupRequest editGroupRequest) {
groupService.editGroupPermission(editGroupRequest); groupService.editGroupPermission(editGroupRequest);
} }