From d45b4065d8e0b6cc893ccde66e0c37f459ca901b Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" <jneen@jneen.net>
Date: Wed, 26 Jul 2017 09:33:23 -0700
Subject: [PATCH] make sure users have to be able to read_pipeline

to get pipeline failed notifications
---
 app/services/notification_service.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 675b4536a26..c330d62a2ce 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -308,7 +308,8 @@ class NotificationService
 
     recipients ||= NotificationRecipientService.notifiable_users(
       [pipeline.user], pipeline.project, :watch,
-      custom_action: :"#{pipeline.status}_pipeline"
+      custom_action: :"#{pipeline.status}_pipeline",
+      read_ability: :read_pipeline,
     ).map(&:notification_email)
 
     if recipients.any?
-- 
GitLab