Guarded against an inactive user being set as a reviewer or owner of a review request

Review Request #11422 — Created Jan. 30, 2021 and updated — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

A change that prevents an inactive user to be assigned as a submitter or reviewer for a
unpublished review request. In addition to this, this change will prevent
a review request draft from being published if the submitter or reviewer(s) are inactive.

I've manually validated in the UI for draft review request that an error appears if a user
tries to update the owner/submitter or target people (reviewers) field with an innactive
user

-I've created unit tests for when a review request draft is published for the following
cases
1. A review request draft is published with an inactive reviewer
2. A review request draft is published with an inactive owner/submitter
3. A review request draft is published with multiple reviewers, one of which is inactive

-I've also created additional unit tests regarrding when a review request draft is updated
using a PUT request
5. A PUT API call is made to update a review request draft with an inactive user set as the
owner/submitter of the review request
7. A PUT API call is made to update a review request draft with an inactive user set as one
8. of the reviewers of the review request

Diff Revision 5

This is not the most recent revision of the diff. The latest diff is revision 10. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10

Commits

First Last Summary ID Author
Guarded against an inactive user or owner from being assigned to a review.
A change that prevents an inactive user to be assigned as a submitter or reviewer for a published or unpublished review request. In addition to this, this change will prevent a review request draft from being published if the submitter or reviewer(s) are inactive.
47a726d9344045966731e7d789ab5b469f96f547 mderose123
Addendum Made code fixes based on flake8 code styling recommendations
55390df0128c8883c6c936d662c191ad1ed72763 mderose123
Addendum Fixed Further Flake8 Code Styling Issues
dfa0445c86ed412ac9e12bdbccf6a2fe0e8ddb59 mderose123
Addendum Fixed Flake8 Issues Again
b2694e1d558f70d333d36587503859fa326e2821 mderose123
Added tests for handling put requests
with for updating submitter or target people with inactive users
07d9184b8ef78a6569c5bce98844af2355dc3d6f mderose123
Addendum removed whitespace as recommended by flake8
3c55086ca8fbbf3b32c51afc75ac97ad5bd9bd16 mderose123
.vscode/settings.json
reviewboard/reviews/models/review_request_draft.py
reviewboard/reviews/tests/test_review_request_draft.py
reviewboard/webapi/resources/review_request.py
reviewboard/webapi/resources/review_request_draft.py
reviewboard/webapi/tests/test_review_request_draft.py
Loading...