diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-04-03 11:00:33 +0000 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-04-05 08:41:56 +0200 |
commit | 52967b107b7b2f1472b4c005f70f21346079cd95 (patch) | |
tree | 12e99d4fe27f69af53920bd4db3a81e473def642 /lib/gitlab/data_builder | |
parent | 98106ec54e439455f545f3df15332a28b9b0c969 (diff) | |
download | gitlab-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 'lib/gitlab/data_builder')
-rw-r--r-- | lib/gitlab/data_builder/note.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/data_builder/note.rb b/lib/gitlab/data_builder/note.rb index 50fea1232af..f573368e572 100644 --- a/lib/gitlab/data_builder/note.rb +++ b/lib/gitlab/data_builder/note.rb @@ -9,6 +9,7 @@ module Gitlab # # data = { # object_kind: "note", + # event_type: "confidential_note", # user: { # name: String, # username: String, @@ -51,8 +52,11 @@ module Gitlab end def build_base_data(project, user, note) + event_type = note.confidential? ? 'confidential_note' : 'note' + base_data = { object_kind: "note", + event_type: event_type, user: user.hook_attrs, project_id: project.id, project: project.hook_attrs, |