Skip to content

Show `email_reset_offered_at` to admin users

Kenneth Chu requested to merge kenneth-show-email-reset-admins into master

What does this MR do and why?

Allow admin users to see if a user has reset their email or not through the Account email verification process

Related issues:

Screenshots or screen recordings

For Admin area:

Before After
image image

How to set up and validate locally

  1. Create a new user
  2. View the admin area for the user profile. Eg. http://<gitlab-instance-domain>/admin/users/<myusername>. There should now be a Email reset done at row with a value of Never.
  3. View the API for that user. Eg. http://<gitlab-instance-domain>/api/v4/users?search=<myusername>. There should be a email_reset_offered_at item with a value of null.
  4. Open up the rails console, and run the following (Assume the ID of the user we created is 13):
    user = User.find(13)
    user.email_reset_offered_at = 1.hour.ago
    user.save!
  5. View the admin area for the user profile. Eg. http://<gitlab-instance-domain>/admin/users/<myusername>. There should now be a Email reset done at row with a timestamp from an hour ago.
  6. View the API for that user. Eg. http://<gitlab-instance-domain>/api/v4/users?search=<myusername>. There should be a email_reset_offered_at item with a timestamp from an hour ago.

MR acceptance checklist

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

Merge request reports