diff options
author | Cindy Pallares <cindy@gitlab.com> | 2018-11-28 22:54:52 +0000 |
---|---|---|
committer | Cindy Pallares <cindy@gitlab.com> | 2018-11-28 19:14:23 -0500 |
commit | 82f455a8ca3ed366c25aa75e7f443b66a1693b07 (patch) | |
tree | d3ce12764d8fbcb85b2d56e4f6f69cf2bb220902 /app/views | |
parent | 5736d6606ad7c6d729baa6c4ef789a47ada4ceda (diff) | |
download | gitlab-ce-82f455a8ca3ed366c25aa75e7f443b66a1693b07.tar.gz |
Merge branch 'security-email-change-notification' into 'master'
[master] Resolve: "Provide email notification when a user changes their email address"
See merge request gitlab/gitlabhq!2587
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/devise/mailer/email_changed.html.haml | 12 | ||||
-rw-r--r-- | app/views/devise/mailer/email_changed.text.erb | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/app/views/devise/mailer/email_changed.html.haml b/app/views/devise/mailer/email_changed.html.haml new file mode 100644 index 00000000000..5398430fdfd --- /dev/null +++ b/app/views/devise/mailer/email_changed.html.haml @@ -0,0 +1,12 @@ += email_default_heading("Hello, #{@resource.name}!") + +- if @resource.try(:unconfirmed_email?) + %p + We're contacting you to notify you that your email is being changed to #{@resource.reload.unconfirmed_email}. +- else + %p + We're contacting you to notify you that your email has been changed to #{@resource.email}. + +%p + If you did not initiate this change, please contact your administrator + immediately. diff --git a/app/views/devise/mailer/email_changed.text.erb b/app/views/devise/mailer/email_changed.text.erb new file mode 100644 index 00000000000..18137389e7b --- /dev/null +++ b/app/views/devise/mailer/email_changed.text.erb @@ -0,0 +1,10 @@ +Hello, <%= @resource.name %>! + +<% if @resource.try(:unconfirmed_email?) %> +We're contacting you to notify you that your email is being changed to <%= @resource.reload.unconfirmed_email %>. +<% else %> +We're contacting you to notify you that your email has been changed to <%= @resource.email %>. +<% end %> + +If you did not initiate this change, please contact your administrator +immediately. |