diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-04-03 14:00:33 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-04-05 09:41:56 +0300 |
commit | 52967b107b7b2f1472b4c005f70f21346079cd95 (patch) | |
tree | 12e99d4fe27f69af53920bd4db3a81e473def642 /app/models/note.rb | |
parent | 98106ec54e439455f545f3df15332a28b9b0c969 (diff) |
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/models/note.rb')
-rw-r--r-- | app/models/note.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 0f5fb529a87..109405d3f17 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -268,6 +268,10 @@ class Note < ActiveRecord::Base self.special_role = Note::SpecialRole::FIRST_TIME_CONTRIBUTOR end + def confidential? + noteable.try(:confidential?) + end + def editable? !system? end |