diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index cb81346..57de775 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -353,8 +353,8 @@ def pull_request_drop_comment(repo, requestid, username=None): flask.abort(404, 'Comment not found') if (flask.g.fas_user.username != comment.user.username - and comment.parent.status is True) \ - or not is_repo_admin(repo): + or comment.parent.status is False) \ + and not is_repo_admin(repo): flask.abort( 403, 'You are not allowed to remove this comment from ' diff --git a/pagure/ui/issues.py b/pagure/ui/issues.py index 8184343..bd80924 100644 --- a/pagure/ui/issues.py +++ b/pagure/ui/issues.py @@ -77,8 +77,8 @@ def update_issue(repo, issueid, username=None): flask.abort(404, 'Comment not found') if (flask.g.fas_user.username != comment.user.username - and comment.parent.status is True) \ - or not is_repo_admin(repo): + or comment.parent.status != 'Open') \ + and not is_repo_admin(repo): flask.abort( 403, 'You are not allowed to remove this comment from '