Display banned group members
What does this MR do and why?
This MR implements a first iteration of https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/42.
It adds a table containing banned members of the group on the group's members page.
For the next iteration (a separate MR), the unban action will be added to each row of banned members in the table.
Screenshots or screen recordings
How to set up and validate locally
Set up
- 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
Validate
- Create a top-level group and invite another member as a non-owner to the group
- Ban the invited user in (1) by running the following in Rails console:
> group = Group.last # the group you created in (1) > user = User.last # the user you invited to your group in (1) > Users::Abuse::NamespaceBans::CreateService.new(namespace: group, user: user).execute
- Using the group owner user go to the group's members page
- Validate that you can see
Banned
tab and the banned user is in the table
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