Add banned/blocked indicator to GitLab.com card matches admin page
What does this MR do and why?
- Adds
(banned)
and(blocked)
texts, when applicable, next to the username inee/app/views/admin/users/card_match.html.haml
This same feature was implemented for the similar view ee/app/views/admin/users/phone_match.html.haml
in this MR: !139083 (merged).
This feature helps the Trust and Safety team investigate bad actors that create multiple GitLab users on GitLab.com with the same credit card info.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
When current user is banned: |
How to set up and validate locally
-
From the rails console, create matching card validation data for 3 users:
Users::CreditCardValidation.create(user: User.find_by_username("reported_user_1"), credit_card_validated_at: Time.now, holder_name_hash: "foo") Users::CreditCardValidation.create(user: User.find_by_username("reported_user_2"), credit_card_validated_at: Time.now, holder_name_hash: "foo") Users::CreditCardValidation.create(user: User.find_by_username("reported_user_3"), credit_card_validated_at: Time.now, holder_name_hash: "foo")
-
From the Admin Area, ban one of the users from the previous step, and block another one.
-
In the Admin Area, go to the profile page of one of the users (for example:
http://gdk.test:3000/admin/users/reported_user_1
). Scroll down to the Credit Card section and click on View card matches. -
Check that, next to the username, one user has the
(banned)
text, another user has the(blocked)
and the third user has no text. (One of the users will have the(this user)
text).