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-07 09:15:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-07 09:15:33 +0300
commit0ead22f9db870eb1d6914ef60d5c1c998ed538d9 (patch)
tree42cc4f297aa116bc517c86c943428ef0840b70ef /app/mailers
parent9d20ce8c998506a1e27c55bbf99cd4c0595185af (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-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