Commit e0e153d2 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Dont allow diff commenting if MR locked

parent 09a4030c
...@@ -17,7 +17,8 @@ class Diff { ...@@ -17,7 +17,8 @@ class Diff {
} }
}); });
FilesCommentButton.init($diffFile); const tab = document.getElementById('diffs');
if (tab && tab.dataset.isLocked === 'false') FilesCommentButton.init($diffFile);
$diffFile.each((index, file) => new gl.ImageFile(file)); $diffFile.each((index, file) => new gl.ImageFile(file));
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#pipelines.pipelines.tab-pane #pipelines.pipelines.tab-pane
- if @pipelines.any? - if @pipelines.any?
= render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request)
#diffs.diffs.tab-pane #diffs.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked?.to_s } }
-# This tab is always loaded via AJAX -# This tab is always loaded via AJAX
.mr-loading-status .mr-loading-status
......
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