From 938f3b2a0b4bdf2047caf8735312c80e2291b274 Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Wed, 17 Aug 2016 17:05:00 +0200 Subject: edit_blob_link can receive the blob to avoid access to the repository --- app/views/projects/diffs/_file.html.haml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/views/projects/diffs/_file.html.haml') diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 8fbd89100ca..ad2eb3e504f 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -10,10 +10,9 @@ \ - if editable_diff?(diff_file) - = edit_blob_link(@merge_request.source_project, - @merge_request.source_branch, diff_file.new_path, - from_merge_request_id: @merge_request.id, - skip_visible_check: true) + - link_opts = @merge_request.id ? { from_merge_request_id: @merge_request.id } : {} + = edit_blob_link(@merge_request.source_project, @merge_request.source_branch, diff_file.new_path, + blob: blob, link_opts: link_opts) = view_file_btn(diff_commit.id, diff_file.new_path, project) -- cgit v1.2.1