Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/mailers/emails/profile.rb
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
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.rb12
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