fix: 修复工作空间移除成员权限的问题

This commit is contained in:
CaptainB 2023-05-08 18:46:22 +08:00 committed by 刘瑞斌
parent a10d2203be
commit 9e7eb5c32e
1 changed files with 2 additions and 0 deletions

View File

@ -221,6 +221,7 @@ public class UserController {
*/
@GetMapping("/ws/member/delete/{workspaceId}/{userId}")
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.DELETE, title = "删除工作空间成员")
@RequiresPermissions(PermissionConstants.WORKSPACE_USER_READ_DELETE)
public void deleteMember(@PathVariable String workspaceId, @PathVariable String userId) {
// workspaceService.checkWorkspaceOwner(workspaceId);
String currentUserId = SessionUtils.getUser().getId();
@ -232,6 +233,7 @@ public class UserController {
@GetMapping("/project/member/delete/{projectId}/{userId}")
// @MsAuditLog(module = "workspace_member", type = OperLogConstants.DELETE, title = "删除工作空间成员")
@RequiresPermissions(value={PermissionConstants.PROJECT_USER_READ_DELETE}, logical = Logical.OR)
public void deleteProjectMember(@PathVariable String projectId, @PathVariable String userId) {
String currentUserId = SessionUtils.getUser().getId();
if (StringUtils.equals(userId, currentUserId)) {