[DS-7896][fix] Fixed the problem of duplicating project names when authorizing projects (#8453)

This closes #7896
slim
Sunny Lei 2022-03-10 16:58:02 +08:00 committed by GitHub
parent bb1ba967cd
commit 2aed250ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -566,9 +566,9 @@ public class UsersServiceImpl extends BaseServiceImpl implements UsersService {
return result;
}
//if the selected projectIds are empty, delete all items associated with the user
projectUserMapper.deleteProjectRelation(0, userId);
if (check(result, StringUtils.isEmpty(projectIds), Status.SUCCESS)) {
projectUserMapper.deleteProjectRelation(0, userId);
return result;
}