Add a method for returning reviews that are accessible by a given user to ReviewManager
Review Request #12302 — Created May 25, 2022 and submitted — Latest diff uploaded
Currently there is no efficient way to query for reviews that are
accessible by a given user when usingReviews.objects
. This change adds a
method toReviewManager
such thatReviews.objects.accessible(user)
returns a
queryset of reviews that are accessible by the given user.
- Created
test_review_manager.py
file and moved in theReviewManager
tests fromtest_review.py
. - Created tests for
Review.objects.accessible
and ran all tests in
test_review_manager.py
with success.
Diff Revision 14
This is not the most recent revision of the diff. The latest diff is revision 17. See what's changed.
orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Commits
reviewboard/reviews/managers.py |
---|
reviewboard/reviews/tests/test_review.py |
---|
reviewboard/reviews/tests/test_review_manager.py |
---|