[PATCH 0/3] Allow a project to restrict submitter state changes

Daniel Axtens dja at axtens.net
Tue Aug 3 01:27:26 AEST 2021


In discussions about how to make patchwork more user-friendly and
suitable for more projects, we realised that perhaps the current
ability for submitters to change their patch state to any value
isn't the most appropriate setting for all maintainers, especially
in light of increasing maintainer-driven API-centric automation.

This set of 3 patches allows a project to stop a submitter from
changing the state of their patches - in the UI, via xmlrpc and via
REST. This is not the default behaviour but can be set by a patchwork
administrator on a per-project basis.

Daniel Axtens (3):
  Allow a project to restrict submitter state changes
  xmlrpc: Allow a project to restrict submitter state changes
  REST: Allow a project to restrict submitter state changes

 patchwork/api/patch.py                        | 10 +++
 ...45_project_submitter_state_change_rules.py | 24 +++++
 patchwork/models.py                           | 36 ++++++++
 patchwork/tests/api/test_patch.py             | 70 +++++++++++++++
 patchwork/tests/test_xmlrpc.py                | 90 +++++++++++++++++++
 patchwork/views/__init__.py                   |  8 ++
 patchwork/views/patch.py                      | 14 ++-
 patchwork/views/xmlrpc.py                     |  4 +
 8 files changed, 254 insertions(+), 2 deletions(-)
 create mode 100644 patchwork/migrations/0045_project_submitter_state_change_rules.py

-- 
2.30.2



More information about the Patchwork mailing list