summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-20 13:37:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-20 13:37:47 +0000
commitaee0a117a889461ce8ced6fcf73207fe017f1d99 (patch)
tree891d9ef189227a8445d83f35c1b0fc99573f4380 /app/models/note.rb
parent8d46af3258650d305f53b819eabf7ab18d22f59e (diff)
downloadgitlab-ce-aee0a117a889461ce8ced6fcf73207fe017f1d99.tar.gz
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index cb285028203..a143c21c0f9 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -23,7 +23,7 @@ class Note < ApplicationRecord
include FromUnion
include Sortable
- cache_markdown_field :note, pipeline: :note, issuable_state_filter_enabled: true
+ cache_markdown_field :note, pipeline: :note, issuable_reference_expansion_enabled: true
redact_field :note
@@ -603,6 +603,15 @@ class Note < ApplicationRecord
})
end
+ def show_outdated_changes?
+ return false unless for_merge_request?
+ return false unless Feature.enabled?(:display_outdated_line_diff, noteable.source_project, default_enabled: :yaml)
+ return false unless system?
+ return false unless change_position&.line_range
+
+ change_position.line_range["end"] || change_position.line_range["start"]
+ end
+
private
def system_note_viewable_by?(user)