Owners can unban banned subgroup members
This MR depends on !101029 (merged).
Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/112.
What does this MR do and why?
Currently, only top-level group members are displayed in a top-level group's banned members table. This is a problem because members of subgroups can also be banned from the top-level group but owners can only manage banned members from the top-level group members page.
This MR updates the banned members table to also display and be able to unban subgroup members.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Ensure you are running GDK with an Ultimate license. The following command should log
true
if this is set up correctlyecho "License.feature_available?(:unique_project_download_limit)" | rails c
- Turn on the feature flags:
echo "Feature.enable(:limit_unique_project_downloads_per_namespace_user)" | rails c
- Create a top-level group and then a subgroup inside the top-level group
- Add another user to the subgroup
- Ban the subgroup member you just added via Rails console
> subgroup = Group.last # assuming the subgroup you created in step 3 is the most recent group created > subgroup_member = subgroup.group_members.last # this should be the user you added to the subgroup. Not the owner of the top-level group > group = subgroup.parent > ::Namespaces::NamespaceBan.create(user: subgroup_member.user, namespace: group)
- Validate that the user added to the subgroup is displayed in the group's banned members table
- Click on
Unban
button - Validate that the user added to the subgroup is unbanned
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugie Limpin