Skip to content

Allow admin to create an identity verification exemption

Alex Buijs requested to merge identity-verification-exemption into master

What does this MR do and why?

When an identity verification exemption is created, a user just needs to confirm an email address to confirm their identity. They do not need to confirm their identity with a phone number and/or a credit card.

This also removes the phone number exemption button from the admin interface as that has become redundant with the self-service option that was introduced with this MR.

Issue: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/459

Screenshots or screen recordings

Before After
Screenshot_2023-10-12_at_15.01.45 Screenshot_2023-10-12_at_15.10.11
Screenshot_2023-10-12_at_15.02.14 Screenshot_2023-10-12_at_15.13.45

How to set up and validate locally

  1. Enable identity verification

    Feature.enable(:identity_verification)
    Feature.enable(:identity_verification_phone_number)
    ApplicationSetting.current.update(email_confirmation_setting: 2, require_admin_approval_after_user_signup: false)
  2. Visit http://localhost:3000/users/sign_up, create a new account and stop when on the identity verification page (http://localhost:3000/users/identity_verification)

  3. Update the new created user's risk score to Medium

    User.last.custom_attributes.create!(key: UserCustomAttribute::ARKOSE_RISK_BAND, value: Arkose::VerifyResponse::RISK_BAND_MEDIUM)
  4. Refresh the page and verify the new user needs to verify their phone number

  5. Open a second incognito window, login as an admin and visit the users page: http://localhost:3000/admin/users/{User.last.username}

  6. As admin, click the Create identity verification exemption button

  7. Refresh the first window and verify the new user does not need to verify their phone number anymore

  8. As admin, click the Remove identity verification exemption button

  9. Refresh the first window and verify the new user does not need to verify their phone number again

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 Alex Buijs

Merge request reports

Loading