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>2019-12-10 10:53:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 10:53:40 +0300
commitcfc792b9ca064990e6540cb742e80529ea669a81 (patch)
tree147cd4256319990cebbc02fe8e4fbbbe06f5720a /app/services/notification_service.rb
parent93c6764dacd4c605027ef1cd367d3aebe420b223 (diff)
Add latest changes from gitlab-org/gitlab@master
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