summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-06-14 21:29:29 +0000
committerRobert Speicher <robert@gitlab.com>2016-06-14 21:29:29 +0000
commite7a8fe07ea8a1dca711274e85630a0cf2107b3cc (patch)
treeaeef339596ef226fbb56eecdddc591699163eeb9 /app/finders
parentc6ed8edf8e29ca37f64df07602f13fc7a34abf58 (diff)
parent7ae0df8faeeabbcfb07d9f834c132ad5c56c7f74 (diff)
downloadgitlab-ce-e7a8fe07ea8a1dca711274e85630a0cf2107b3cc.tar.gz
Merge branch '18535-confidential-issue-notes' into 'master'
Only show notes through JSON on confidential issues that the user has access to Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18535 See merge request !1970
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/notes_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index ee14ac60fb4..0b7832e6583 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -12,7 +12,7 @@ class NotesFinder
when "commit"
project.notes.for_commit_id(target_id).non_diff_notes
when "issue"
- project.issues.find(target_id).notes.inc_author
+ project.issues.visible_to_user(current_user).find(target_id).notes.inc_author
when "merge_request"
project.merge_requests.find(target_id).mr_and_commit_notes.inc_author
when "snippet", "project_snippet"