Delayed user deletion does not consider elevated roles in subgroup for immediate deletion
Summary
Immediate user deletion does not occur when a group member has a role less than Reporter
in the top-level group, but has an elevated role in a subgroup/project.
Related to !121912 (merged)
Steps to reproduce
- Create a new user
- Invite the user as a
Guest
to the top-level paid group - Invite the user to a subgroup of a paid group with a
Developer
role - Login to the new user and make a comment on an Issue/MR
- As the new user, Delete your own account
What is the current bug behavior?
User in paid group is not immediately deleted.
What is the expected correct behavior?
User who is using a seat in a paid group is immediately deleted.
Possible fixes
Use using_license_seat?
instead of belongs_to_paid_namespace
?