summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-23 16:17:10 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-23 16:17:10 +0100
commita30645c68f31d848ebad8c7ca395b55b9449db6d (patch)
tree70a00c8f0cb62e4f1cc34c4238afe9fa224a7462 /app
parentbc4e25189805879490555ef2782193470f4fe295 (diff)
downloadgitlab-ce-a30645c68f31d848ebad8c7ca395b55b9449db6d.tar.gz
Don't show commit comment button when user is not signed in.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/diffs/_text_file.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index b1c987563f1..e691db9c08e 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -16,7 +16,7 @@
- else
%td.old_line
= link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", id: line_code
- - if @comments_allowed
+ - if @comments_allowed && can?(current_user, :write_note, @project)
= link_to_new_diff_note(line_code)
%td.new_line{data: {linenumber: line.new_pos}}
= link_to raw(type == "old" ? "&nbsp;" : line.new_pos) , "##{line_code}", id: line_code