# HG changeset patch # User Thomas De Schampheleire # Date 2015-02-11 22:13:11 # Node ID 468073f2ebd6538b5e6f8ab7fa30f5a21c959f13 # Parent 15cb8156b10d732cf39b37a88c656894621c0f54 pullrequests: allow closing only by author and admin A pullrequest should not be closable by any reviewer, especially not since there is no reopening feature. The check on change_status is no longer necessary, as the new permission check is more restrictive. diff --git a/kallithea/templates/changeset/changeset_file_comment.html b/kallithea/templates/changeset/changeset_file_comment.html --- a/kallithea/templates/changeset/changeset_file_comment.html +++ b/kallithea/templates/changeset/changeset_file_comment.html @@ -183,9 +183,12 @@ %endfor - %if is_pr and change_status: - - + + %if is_pr and ( \ + h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) \ + or c.pull_request.author.user_id == c.authuser.user_id): + + %endif %endif