summaryrefslogtreecommitdiff
path: root/app/views/projects/issues/show.html.haml
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-08-24 17:59:24 +0200
committerJarka Kadlecova <jarka@gitlab.com>2017-08-25 11:52:27 +0200
commit19da7a558711b38316d83012d919b7ea8252a26b (patch)
treecacd79075c1a78e1c3de42e913ada9796a1d5504 /app/views/projects/issues/show.html.haml
parent610155e063251036f35aadd4dc0f707d1738e54b (diff)
downloadgitlab-ce-19da7a558711b38316d83012d919b7ea8252a26b.tar.gz
Fix failure when issue author is nil
Diffstat (limited to 'app/views/projects/issues/show.html.haml')
-rw-r--r--app/views/projects/issues/show.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index ad5befc6ee5..de0f1de057d 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -32,7 +32,8 @@
%ul
- if can_update_issue
%li= link_to 'Edit', edit_project_issue_path(@project, @issue)
- - unless current_user == @issue.author
+ / TODO: simplify condition back #36860
+ - if @issue.author && current_user != @issue.author
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
- if can_update_issue
%li= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, format: 'json'), class: "btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'