summaryrefslogtreecommitdiff
path: root/lib/api/discussions.rb
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-08-09 14:54:57 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-08-28 15:04:23 +0200
commitc9b4dc677abdebc02ecac4dca65a759d3f07b2a0 (patch)
treebc19401d0e29a912d6db7d13cc4fea71d68beda2 /lib/api/discussions.rb
parent20920f8074a45c0e2c3bbeab9be44e7b6d1dd398 (diff)
downloadgitlab-ce-c9b4dc677abdebc02ecac4dca65a759d3f07b2a0.tar.gz
Filter out old system notes for epics
Diffstat (limited to 'lib/api/discussions.rb')
-rw-r--r--lib/api/discussions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/discussions.rb b/lib/api/discussions.rb
index 6c1acc3963f..9125207167c 100644
--- a/lib/api/discussions.rb
+++ b/lib/api/discussions.rb
@@ -239,7 +239,7 @@ module API
# because notes are redacted if they point to projects that
# cannot be accessed by the user.
notes = prepare_notes_for_rendering(notes)
- notes.reject { |n| n.cross_reference_not_visible_for?(current_user) }
+ notes.select { |n| n.visible_for?(current_user) }
end
# rubocop: enable CodeReuse/ActiveRecord
end