diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 00:07:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 00:07:58 +0300 |
commit | fcfe959a5ddee652a27e6b1179a116fdbb70986b (patch) | |
tree | 4dbcf2a93aaaf4952507207168c582f5948efaa3 /app/services/notification_service.rb | |
parent | 7f3f19582b13b4162212bcf0ae72eef63685ffbc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index d29bd15ac2e..1224cf80b76 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -87,6 +87,13 @@ class NotificationService mailer.access_token_expired_email(user).deliver_later end + # Notify the user when one of their personal access tokens is revoked + def access_token_revoked(user, token_name) + return unless user.can?(:receive_notifications) + + mailer.access_token_revoked_email(user, token_name).deliver_later + end + # Notify the user when at least one of their ssh key has expired today def ssh_key_expired(user, fingerprints) return unless user.can?(:receive_notifications) |