Skip to content

Commit

Permalink
项目交接-bugfix新owner重复加入工作空间
Browse files Browse the repository at this point in the history
  • Loading branch information
xlinliu committed Sep 18, 2024
1 parent c3cff3b commit 51f952f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ public void transferProject(ProjectTransferRequest projectTransferRequest, DSSPr
initProjectModifyRequest(projectModifyRequest,projectTransferRequest, oldProjectOwner);

String newProjectOwner = projectTransferRequest.getTransferUserName();
if (!dssWorkspaceUserService.getUserRoleByUserName(newProjectOwner).isEmpty()) {
Long count = dssWorkspaceUserService.getCountByUsername(newProjectOwner, (int)workspace.getWorkspaceId());
if (count == null || count == 0) {
dssUserService.insertIfNotExist(newProjectOwner, workspace);
List<Integer> roles = Collections.singletonList(3);
List<Integer> roles = Collections.singletonList(4);
dssWorkspaceUserService.addWorkspaceUser(roles, workspace.getWorkspaceId(), newProjectOwner, "system",
null);
}
Expand Down

0 comments on commit 51f952f

Please sign in to comment.