diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-17 18:05:00 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-18 17:30:25 +0300 |
commit | 938f3b2a0b4bdf2047caf8735312c80e2291b274 (patch) | |
tree | 583dcadb643a9e9a0dd4864f7779166d9af9ccc2 /app/views/projects/diffs | |
parent | ac73de508e21af95b473bfafc2ca2543b234430d (diff) |
edit_blob_link can receive the blob to avoid access to the repository
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 7 |
1 files changed, 3 insertions, 4 deletions
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) |