Fix default emaildomain when creating PAT users

What does this MR do and why?

Remove hardcoded example.com emaildomain for users that are created by creating a resource access tokens. The emaildomain is now set to the instance hostname with a noreply subdomain prefix (see Gitlab.config.gitlab.host https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/initializers/1_settings.rb#L167).

@example.com => @noreply.#{Gitlab.config.gitlab.host}

Screenshots or screen recordings

260305_quick_patch

How to set up and validate locally

  1. Install Current GitLab Instance
  2. Apply Patch
  3. Restart GitLab
  4. Create a Projekt Access Token
  5. Set a name for the token
  6. Go to admin/users
  7. search for the token name
  8. check the emaildomain for the user

MR acceptance checklist

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

Related to #260305 (closed)

Edited by cruelsmith

Merge request reports

Loading