diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html
index 84f14f5..8631ccd 100644
--- a/pagure/templates/_formhelper.html
+++ b/pagure/templates/_formhelper.html
@@ -138,11 +138,15 @@
+ {% if id != 0 and g.fas_user and (
+ (comment.parent.status in [True, 'Open'] and g.fas_user.username == comment.user.username)
+ or repo_admin) %}
+ {% endif %}
{% if id != 0 and g.fas_user and (
(comment.parent.status in [True, 'Open'] and g.fas_user.username == comment.user.username)
or repo_admin) %}
@@ -151,6 +155,7 @@
title="Remove comment">
+
{% endif %}
@@ -177,7 +182,8 @@
reply
- {% if repo_admin or (g.fas_user.username == comment.user.username) %}
+ {% if repo_admin or (
+ g.fas_user and g.fas_user.username == comment.user.username) %}
edit