From fcfe959a5ddee652a27e6b1179a116fdbb70986b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 28 Sep 2022 21:07:58 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/mailers/emails/profile.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/mailers/emails/profile.rb') diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index c27e181ebd6..65ea90d0b5d 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -94,6 +94,18 @@ module Emails end end + def access_token_revoked_email(user, token_name) + return unless user&.active? + + @user = user + @token_name = token_name + @target_url = profile_personal_access_tokens_url + + Gitlab::I18n.with_locale(@user.preferred_language) do + mail_with_locale(to: @user.notification_email_or_default, subject: subject(_("A personal access token has been revoked"))) + end + end + def ssh_key_expired_email(user, fingerprints) return unless user&.active? -- cgit v1.2.3