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:
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 909a0033d12..731d72c41d4 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -35,6 +35,12 @@ class NotificationService
@async ||= Async.new(self)
end
+ def disabled_two_factor(user)
+ return unless user.can?(:receive_notifications)
+
+ mailer.disabled_two_factor_email(user).deliver_later
+ end
+
# Always notify user about ssh key added
# only if ssh key is not deploy key
#