summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-02-28 15:24:04 -0800
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 11:49:53 -0800
commitf7a111e97656a441e1c78e9ed81d4212f46dfb23 (patch)
tree412e5539b895104cf2e53209fda5a6103d50d970 /app/services/notification_service.rb
parentbb0cba920ae5ce46ecc80907c445ddc85f3b4ed1 (diff)
downloadgitlab-ce-f7a111e97656a441e1c78e9ed81d4212f46dfb23.tar.gz
use policies to protect sending email
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index fbad85d310e..d12692ecc90 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -465,7 +465,7 @@ class NotificationService
end
users = users.to_a.compact.uniq
- users = users.reject(&:blocked?)
+ users = users.select { |u| u.can?(:receive_notifications) }
users.reject do |user|
global_notification_setting = user.global_notification_setting