diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-04-11 20:08:35 +0000 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-04-11 20:08:35 +0000 |
commit | b728e30e812fe277731df7e2f88663b3446f9872 (patch) | |
tree | a57c191f4a62a07503236276d135beaf5a4f432a | |
parent | e3b0039405ed54e6cb435f06407a6d84a36b91b6 (diff) | |
parent | b4f0ecde79b3263e8875d75cdcf94d011d0d81fe (diff) | |
download | gitlab-ce-b728e30e812fe277731df7e2f88663b3446f9872.tar.gz |
Merge branch '30636-fix-blame-edit-blob-without-repo-permissions' into 'master'
Fix "Edit" button on blame page without repo permissions
Closes #30636
See merge request !10598
-rw-r--r-- | app/views/projects/blob/_blob.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/blob/_header.html.haml | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index fd0ae42571e..9aafff343f0 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -25,13 +25,6 @@ #blob-content-holder.blob-content-holder %article.file-holder = render "projects/blob/header", blob: blob - - if current_user - .js-file-fork-suggestion-section.file-fork-suggestion.hidden - %span.file-fork-suggestion-note - You don't have permission to edit this file. Try forking this project to edit the file. - = link_to 'Fork', fork_path, method: :post, class: 'btn btn-grouped btn-inverted btn-new' - %button.js-cancel-fork-suggestion.btn.btn-grouped{ type: 'button' } - Cancel - if blob.empty? .file-content.code diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index c42bf3c324a..7a4a293548c 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -38,3 +38,10 @@ - if current_user = replace_blob_link = delete_blob_link +- if current_user + .js-file-fork-suggestion-section.file-fork-suggestion.hidden + %span.file-fork-suggestion-note + You don't have permission to edit this file. Try forking this project to edit the file. + = link_to 'Fork', fork_path, method: :post, class: 'btn btn-grouped btn-inverted btn-new' + %button.js-cancel-fork-suggestion.btn.btn-grouped{ type: 'button' } + Cancel |