diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-01 15:08:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-01 15:08:30 +0000 |
commit | a0fdcfcdd514c2af98f18cadfa75f8a6a85b4d2c (patch) | |
tree | ecba106fd4d1426cc2109a6ba3da091be2de1f87 /app/mailers | |
parent | 2828f81d2a41f46b89e13dc057b982f27aeee547 (diff) | |
download | gitlab-ce-a0fdcfcdd514c2af98f18cadfa75f8a6a85b4d2c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/identity_verification.rb | 15 | ||||
-rw-r--r-- | app/mailers/notify.rb | 1 | ||||
-rw-r--r-- | app/mailers/previews/notify_preview.rb | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/app/mailers/emails/identity_verification.rb b/app/mailers/emails/identity_verification.rb new file mode 100644 index 00000000000..2fc8cae06fe --- /dev/null +++ b/app/mailers/emails/identity_verification.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Emails + module IdentityVerification + def verification_instructions_email(user_id, token:, expires_in:) + @token = token + @expires_in_minutes = expires_in + @password_link = edit_profile_password_url + @two_fa_link = help_page_url('user/profile/account/two_factor_authentication') + + user = User.find(user_id) + email_with_layout(to: user.email, subject: s_('IdentityVerification|Verify your identity')) + end + end +end diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index b70ce1d3655..ed7681e595f 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -23,6 +23,7 @@ class Notify < ApplicationMailer include Emails::ServiceDesk include Emails::InProductMarketing include Emails::AdminNotification + include Emails::IdentityVerification helper TimeboxesHelper helper MergeRequestsHelper diff --git a/app/mailers/previews/notify_preview.rb b/app/mailers/previews/notify_preview.rb index 074aec54b10..be8d96012cc 100644 --- a/app/mailers/previews/notify_preview.rb +++ b/app/mailers/previews/notify_preview.rb @@ -213,6 +213,10 @@ class NotifyPreview < ActionMailer::Preview ::Notify.user_auto_banned_email(user.id, user.id, max_project_downloads: 5, within_seconds: 600, group: group).message end + def verification_instructions_email + Notify.verification_instructions_email(user.id, token: '123456', expires_in: 60).message + end + private def project |