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:
authorAlexis Reigel <mail@koffeinfrei.org>2017-02-28 12:49:59 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:40:41 +0300
commitc1281982bd7975b45bed5b8e2c5ef5e242ea18fd (patch)
treea4a76d4cd9ab0d4ca324902355fa60ced1ecdb9b /app/services/notification_service.rb
parentf0fe1b9d4397e6c1c6aa2da6e371e234db774fe2 (diff)
notification email on add new gpg key
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 3a98a5f6b64..b94921d2a08 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -17,6 +17,16 @@ class NotificationService
end
end
+ # Always notify the user about gpg key added
+ #
+ # This is a security email so it will be sent even if the user user disabled
+ # notifications
+ def new_gpg_key(gpg_key)
+ if gpg_key.user
+ mailer.new_gpg_key_email(gpg_key.id).deliver_later
+ end
+ end
+
# Always notify user about email added to profile
def new_email(email)
if email.user