Unverified Commit 7b3fd816 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Disable comments on older merge request diff

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent e6b74db57e2e
......@@ -93,6 +93,11 @@ def diffs
respond_to do |format|
format.html { define_discussion_vars }
format.json do
if @merge_request_diff != @merge_request.merge_request_diff
# Disable comments if browsing older version of the diff
@diff_notes_disabled = true
@diffs = @merge_request_diff.diffs(diff_options)
render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment