Skip to content

Save phone numbers of auto-banned users and show them in admin pages

Ruby Nealon requested to merge ruby/related-by-phone-number into master

cc @jayswain @gitlab-org/modelops/anti-abuse @gitlab-com/gl-security/security-operations/trust-and-safety

What does this MR do and why?

Implements https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/517

  • Save phone verification record when the number relates to a banned user
  • Show other users with same phone number in admin user/abuse report pages
  • Fix missing bottom margin on phone/credit card verification cards in admin show user page

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-12-07_at_21.09.29Screenshot_2023-12-18_at_17.08.10 Screenshot_2023-12-07_at_21.08.11Screenshot_2023-12-18_at_17.08.42Screenshot_2023-12-18_at_17.09.52

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  • Set export GITLAB_SIMULATE_SAAS=1 in the env.runit file in the GDK root (create if it doesn't exist) and run gdk restart
  • Create some overlapping/non-overlapping Users::PhoneNumberValidations on users, ideally the reported_user_XX seeded users so there are already abuse reports
    • You can find the seeded reported users in your GDK admin /admin/abuse_reports/
    • example: Users::PhoneNumberValidation.create(user: User.find_by_username("reported_user_18"), international_dial_code: 1, country: "US", phone_number: "123456789")
  • Check the show user page, abuse report page and linked matching phone number pages for the users
    • The best place to start from this might be the /admin/abuse_reports/ list, as you can get to the abuse report show pages (and then user/matches pages) from here.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ruby Nealon

Merge request reports

Loading