summaryrefslogtreecommitdiff
path: root/app/services/notes
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-04-03 11:00:33 +0000
committerJames Lopez <james@jameslopez.es>2018-04-05 08:41:56 +0200
commit52967b107b7b2f1472b4c005f70f21346079cd95 (patch)
tree12e99d4fe27f69af53920bd4db3a81e473def642 /app/services/notes
parent98106ec54e439455f545f3df15332a28b9b0c969 (diff)
downloadgitlab-ce-52967b107b7b2f1472b4c005f70f21346079cd95.tar.gz
Merge branch 'jej/mattermost-notification-confidentiality-10-6' into 'security-10-6'
[10.6] Prevent notes on confidential issues from being sent to chat See merge request gitlab/gitlabhq!2366 # Conflicts: # app/helpers/services_helper.rb
Diffstat (limited to 'app/services/notes')
-rw-r--r--app/services/notes/post_process_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/notes/post_process_service.rb b/app/services/notes/post_process_service.rb
index ad3dcc5010b..f0cab2ade6d 100644
--- a/app/services/notes/post_process_service.rb
+++ b/app/services/notes/post_process_service.rb
@@ -24,8 +24,10 @@ module Notes
def execute_note_hooks
note_data = hook_data
- @note.project.execute_hooks(note_data, :note_hooks)
- @note.project.execute_services(note_data, :note_hooks)
+ hooks_scope = @note.confidential? ? :confidential_note_hooks : :note_hooks
+
+ @note.project.execute_hooks(note_data, hooks_scope)
+ @note.project.execute_services(note_data, hooks_scope)
end
end
end