Show Identity Verification Alert on MR page
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/691
This MR enables the back-end code to show identity verification required alerts on the MR page when a user has not verified their identity. The alert will only be displayed if the user viewing the MR is the author.
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.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Start GDK with SaaS simulation
$ export GITLAB_SIMULATE_SAAS=1 $ gdk start
- Enable the relevant feature flags
> Feature.enable(:opt_in_identity_verification) > Feature.enable(:identity_verification_phone_number) > Feature.enable(:ci_requires_identity_verification_on_free_plan)
- Update the
created_at
date for a test user to be after the feature release date.> user.update!(created_at: IdentityVerifiable::IDENTITY_VERIFICATION_RELEASE_DATE + 1.day)
- With the test user, create an MR. You should see an alert that identity verification is required before the user can run pipelines.
Edited by Ian Anderson