Changeset - 468073f2ebd6
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 11 years ago 2015-02-11 22:13:11
thomas.de_schampheleire@alcatel-lucent.com
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.
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -183,9 +183,12 @@
 
                        <label for="${status}"><i class="icon-circle changeset-status-${status}" /></i>${lbl}</label>
 
                    </span>
 
                %endfor
 
                %if is_pr and change_status:
 
                <input id="save_close" type="checkbox" name="save_close">
 
                <label id="save_close_label" for="save_close">${_("Close")}</label>
 

	
 
                %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):
 
                  <input id="save_close" type="checkbox" name="save_close">
 
                  <label id="save_close_label" for="save_close">${_("Close")}</label>
 
                %endif
 
              </div>
 
            %endif
0 comments (0 inline, 0 general)