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 1

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
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
Loading...