# HG changeset patch # User Mads Kiilerich # Date 1406917722 -7200 # Node ID a1aa34845e9455c61aa0467051a7c0cd0e19d3a8 # Parent f5e3e703b186ca5f9433704f216eead38ee56341 pull requests: don't allow update of closed PRs diff -r f5e3e703b186 -r a1aa34845e94 kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py Fri Aug 01 20:28:42 2014 +0200 +++ b/kallithea/controllers/pullrequests.py Fri Aug 01 20:28:42 2014 +0200 @@ -466,6 +466,8 @@ def copy_update(self, repo_name, pull_request_id): old_pull_request = PullRequest.get_or_404(pull_request_id) assert old_pull_request.other_repo.repo_name == repo_name + if old_pull_request.is_closed(): + raise HTTPForbidden() org_repo = RepoModel()._get_repo(old_pull_request.org_repo.repo_name) org_ref_type, org_ref_name, org_rev = old_pull_request.org_ref.split(':') diff -r f5e3e703b186 -r a1aa34845e94 kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html Fri Aug 01 20:28:42 2014 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Fri Aug 01 20:28:42 2014 +0200 @@ -194,7 +194,7 @@ %endif
${c.update_msg_other}
- %if c.available: + %if c.available and not c.pull_request.is_closed():
${h.submit('copy_update',_('Create pull request update'),class_="btn btn-small")}