diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/mailers/emails/profile.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/mailers/emails/profile.rb')
-rw-r--r-- | app/mailers/emails/profile.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index 592c394bb48..28e51ba311b 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -58,6 +58,18 @@ module Emails end # rubocop: enable CodeReuse/ActiveRecord + def access_token_created_email(user, token_name) + return unless user&.active? + + @user = user + @target_url = profile_personal_access_tokens_url + @token_name = token_name + + Gitlab::I18n.with_locale(@user.preferred_language) do + mail(to: @user.notification_email_or_default, subject: subject(_("A new personal access token has been created"))) + end + end + def access_token_about_to_expire_email(user, token_names) return unless user |