Skip to content

Domain Verification MVC

Drew Blessing requested to merge dblessing_domain_verification_backend into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Delivers #353030 (closed)

In the Domain Verification MVC we reuse verified Pages domains. SCIM and SAML-created users will not be required to verify their email address when the email domain matches a verified domain. We can trust the domain because the organization owners have verified ownership.

The new view queries pages domains for all projects in the group hierarchy. All domains, verified and unverified, are shown for clarity, with a respective badge identifying its status. This prevents confusion when an owner knows a Pages domain exists but doesn't see it in the list (it's unverified).

Screenshots or screen recordings

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

Screen_Shot_2022-08-22_at_1.56.23_PM

Screen_Shot_2022-08-22_at_2.02.00_PM

How to set up and validate locally

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

Create domains via Rails console

  1. In Rails console, use the following command to create a verified domain:
    project = Project.find_by_full_path('group/project')
    verified_domain = PagesDomain.create!(domain: 'verified.example.com', verified_at: Time.now, project: project)
  2. Use the following command to create an unverified domain:
    project = Project.find_by_full_path('group/project')
    unverified_domain = PagesDomain.create!(domain: 'unverified.example.com', verified_at: nil, project: project)

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 Drew Blessing

Merge request reports