From a7717f0a1fbbfcd147c2e7bbc2d14bb549521daf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 14 2018 14:30:07 +0000 Subject: Let any contributor to a project update the PR meta-data Before this we were considering that only people with commit access could work on PR, but that's not quite true, we should let people with ticket access be able to triage PR as well and thus edit their meta-data. Fixes https://pagure.io/pagure/issue/3967 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index 2f1bef1..da8d9a2 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -477,7 +477,7 @@
Metadata
{% if g.authenticated and mergeform - and (g.repo_committer + and (g.repo_user or g.fas_user.username == pull_request.user.user) %}
@@ -485,7 +485,7 @@
{% endif %}
- {% if g.authenticated and mergeform and g.repo_committer %} + {% if g.authenticated and mergeform and g.repo_user %} diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index c0c743e..9cdd84b 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -1377,7 +1377,7 @@ def update_pull_requests(repo, requestid, username=None, namespace=None): flask.abort(404, "Pull-request not found") if ( - not flask.g.repo_committer + not flask.g.repo_user and flask.g.fas_user.username != request.user.username ): flask.abort(403, "You are not allowed to update this pull-request") @@ -1401,7 +1401,7 @@ def update_pull_requests(repo, requestid, username=None, namespace=None): ) messages = messages.union(set(msgs)) - if flask.g.repo_committer: + if flask.g.repo_user: # Assign or update assignee of the ticket msg = pagure.lib.query.add_pull_request_assignee( flask.g.session,