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>2022-03-18 18:07:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 18:07:23 +0300
commit0b878def9bad1c36ea2b23380a77f9eedaaa6b83 (patch)
treeeb44c34bf05b2dbb1371d8553a7bb7b3d8a1989d /app/services/notification_service.rb
parentbdb1e64a7d620c203e5228717b7c464554b85f55 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index aa7e636b8a4..aecf7cf99b9 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -109,6 +109,13 @@ class NotificationService
mailer.unknown_sign_in_email(user, ip, time).deliver_later
end
+ # Notify a user when a new email address is added to the their account
+ def new_email_address_added(user, email)
+ return unless user.can?(:receive_notifications)
+
+ mailer.new_email_address_added_email(user, email).deliver_later
+ end
+
# When create an issue we should send an email to:
#
# * issue assignee if their notification level is not Disabled