Commit b1397186 authored by Mark Chao's avatar Mark Chao

Merge branch '338636-only-set-commit-email-with-user-input' into 'master'

Only set User#commit_email with user input

See merge request gitlab-org/gitlab!68591
parents 1c82e9a4 e467a3b4
...@@ -6,6 +6,7 @@ module ProfilesHelper ...@@ -6,6 +6,7 @@ module ProfilesHelper
verified_emails = user.verified_emails - [private_email] verified_emails = user.verified_emails - [private_email]
[ [
[s_('Use primary email (%{email})') % { email: user.email }, ''],
[s_("Profiles|Use a private email - %{email}").html_safe % { email: private_email }, Gitlab::PrivateCommitEmail::TOKEN], [s_("Profiles|Use a private email - %{email}").html_safe % { email: private_email }, Gitlab::PrivateCommitEmail::TOKEN],
*verified_emails *verified_emails
] ]
......
...@@ -219,6 +219,7 @@ To set your time zone: ...@@ -219,6 +219,7 @@ To set your time zone:
A commit email is an email address displayed in every Git-related action carried out through the GitLab interface. A commit email is an email address displayed in every Git-related action carried out through the GitLab interface.
Any of your own verified email addresses can be used as the commit email. Any of your own verified email addresses can be used as the commit email.
Your primary email is used by default.
To change your commit email: To change your commit email:
......
...@@ -13,7 +13,8 @@ RSpec.describe ProfilesHelper do ...@@ -13,7 +13,8 @@ RSpec.describe ProfilesHelper do
private_email = user.private_commit_email private_email = user.private_commit_email
emails = [ emails = [
["Use a private email - #{private_email}", Gitlab::PrivateCommitEmail::TOKEN], [s_('Use primary email (%{email})') % { email: user.email }, ''],
[s_("Profiles|Use a private email - %{email}").html_safe % { email: private_email }, Gitlab::PrivateCommitEmail::TOKEN],
user.email, user.email,
confirmed_email1.email, confirmed_email1.email,
confirmed_email2.email confirmed_email2.email
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment