From 4d6a2cf6358b3173c0ccc16d2c4173191b6546e1 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Wed, 13 Sep 2023 17:57:42 -0400 Subject: [PATCH 01/26] ci: always update baseline coverage when building release --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e892493972..35882c5f58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -217,7 +217,7 @@ jobs: - name: Update Baseline Coverage uses: ncipollo/release-action@v1.13.0 - if: ${{ github.event.inputs.updateCoverage == 'true' }} + if: ${{ github.event.inputs.updateCoverage == 'true' || github.ref_name == 'release' }} with: allowUpdates: true tag: baseline From a3fb6a49a320f5f9285cf0a8d8ae2b16f2c40ec2 Mon Sep 17 00:00:00 2001 From: Tero Kivinen Date: Thu, 14 Sep 2023 19:48:28 +0300 Subject: [PATCH 02/26] fix: add review team setting allowing reviewers to reject assignments past the deadline (#5418) * Added a new review team setting allow_reviewer_to_reject_after_deadline that will allow rejecting review requests, even after the deadline is past. Also modified that the secretary, or whoever manages the reviews is always allowed to reject the review regardless of the deadline as he/she could change the deadline anyways. * Fixed but in view_reviews (wrong variable name), added more test cases to the test_reviews.py for different reject cases. * test: More thoroughly exercise assignment rejection * chore: Renumber migration * test: Unrelated user cannot reject assignments --------- Co-authored-by: Jennifer Richards --- ietf/doc/tests_review.py | 111 +++++++++++++++++- ietf/doc/views_review.py | 16 ++- ...allow_reviewer_to_reject_after_deadline.py | 18 +++ ietf/review/models.py | 1 + .../review/reject_reviewer_assignment.html | 2 +- 5 files changed, 140 insertions(+), 8 deletions(-) create mode 100644 ietf/review/migrations/0002_reviewteamsettings_allow_reviewer_to_reject_after_deadline.py diff --git a/ietf/doc/tests_review.py b/ietf/doc/tests_review.py index 5df8ab2593..6dd661055b 100644 --- a/ietf/doc/tests_review.py +++ b/ietf/doc/tests_review.py @@ -418,9 +418,50 @@ def test_reject_reviewer_assignment(self): r = self.client.get(req_url) self.assertEqual(r.status_code, 200) self.assertContains(r, reject_url) + + # anonymous user should not be able to reject + self.client.logout() + r = self.client.post(reject_url, { "action": "reject", "message_to_secretary": "Test message" }) + self.assertEqual(r.status_code, 302) # forwards to login page + assignment = reload_db_objects(assignment) + self.assertEqual(assignment.state_id, "accepted") + + # unrelated person should not be able to reject + other_person = PersonFactory() + login_testing_unauthorized(self, other_person.user.username, reject_url) + r = self.client.post(reject_url, { "action": "reject", "message_to_secretary": "Test message" }) + self.assertEqual(r.status_code, 403) + assignment = reload_db_objects(assignment) + self.assertEqual(assignment.state_id, "accepted") + + # Check that user can reject it + login_testing_unauthorized(self, assignment.reviewer.person.user.username, reject_url) + r = self.client.get(reject_url) + self.assertEqual(r.status_code, 200) + self.assertContains(r, escape(assignment.reviewer.person.name)) + self.assertNotContains(r, 'can not be rejected') + self.assertContains(r, '