diff --git a/rhodecode/apps/repository/views/repo_pull_requests.py b/rhodecode/apps/repository/views/repo_pull_requests.py --- a/rhodecode/apps/repository/views/repo_pull_requests.py +++ b/rhodecode/apps/repository/views/repo_pull_requests.py @@ -326,8 +326,9 @@ class RepoPullRequestsView(RepoAppView, _new_state = { 'created': PullRequest.STATE_CREATED, }.get(self.request.GET.get('force_state')) + can_force_state = c.is_super_admin or HasRepoPermissionAny('repository.admin')(c.repo_name) - if c.is_super_admin and _new_state: + if can_force_state and _new_state: with pull_request.set_state(PullRequest.STATE_UPDATING, final_state=_new_state): h.flash( _('Pull Request state was force changed to `{}`').format(_new_state), diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako --- a/rhodecode/templates/pullrequests/pullrequest_show.mako +++ b/rhodecode/templates/pullrequests/pullrequest_show.mako @@ -274,11 +274,12 @@ % if c.state_progressing:

- ${_('Cannot show diff when pull request state is changing. Current progress state')}: ${c.pull_request.state} + ${_('Cannot show diff when pull request state is changing. Current progress state')}: ${c.pull_request.state}
+ ${_('Consider refreshing the page to check if the status transition was finished')}. - % if c.is_super_admin: + % if c.is_super_admin or h.HasRepoPermissionAny('repository.admin')(c.repo_name):
- If you think this is an error try forced state reset to created state. + ${_('If you think this is an error try ')}forced state reset to created state. % endif