From aee0a117a889461ce8ced6fcf73207fe017f1d99 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Dec 2021 13:37:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-6-stable-ee --- app/models/note.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/models/note.rb') 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) -- cgit v1.2.1