Skip to content
Permalink
Browse files
remove user from cluster space when removing it from admin role (#21)
remove user from cluster space when removing it from admin role
  • Loading branch information
liruixl committed Mar 25, 2022
1 parent cee3117 commit 694d80568efeb6d1065ae0d0799aa343479b4288
Showing 1 changed file with 5 additions and 1 deletion.
@@ -304,8 +304,12 @@ public NewUserSpaceInfo update(CoreUserEntity user, long spaceId, NewUserSpaceCr
if (adminUserId < 0) {
continue;
}
// Delete the user from the space administrator role, but will not delete the user from the space?
// Delete the user from the space administrator role
membershipRepository.deleteByUserIdAndGroupId(clusterInfo.getAdminGroupId(), adminUserId);

// also delete the user form all user role and cluster space
membershipRepository.deleteByUserIdAndGroupId(clusterInfo.getAllUserGroupId(), adminUserId);
clusterUserMembershipRepository.deleteByUserIdAndClusterId(adminUserId, clusterInfo.getId());
}

}

0 comments on commit 694d805

Please sign in to comment.