summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 1709474a6c7..a75eaa99c23 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -58,6 +58,14 @@ class NotificationService
end
end
+ # Notify the owner of the personal access token, when it is about to expire
+ # And mark the token with about_to_expire_delivered
+ def access_token_about_to_expire(user)
+ return unless user.can?(:receive_notifications)
+
+ mailer.access_token_about_to_expire_email(user).deliver_later
+ end
+
# When create an issue we should send an email to:
#
# * issue assignee if their notification level is not Disabled