Add permission lookup control and prep separation for equeries.

Review Request #13432 — Created Nov. 26, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This splits out the permission lookups from the review group equeries
into get_user_permissions_equeries() in
reviewboard.accounts.testing.queries.

The review group and review request equeries have been updated to take
flags indicating whether permission lookup queries are expected. This
would be disabled if they've already been fetched by this point (since
they're cached).

There's a little bit of related cleanup in parts, changing where some
logic (e.g., superuser checks for review group access queries) lives and
better reusing state from expected Q results for prep equeries. These
will be important for upcoming changes.

All unit tests pass.

Diff Revision 1

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

orig
1
2

Commits

First Last Summary ID Author
Add permission lookup control and prep separation for equeries.
This splits out the permission lookups from the review group equeries into `get_user_permissions_equeries()` in `reviewboard.accounts.testing.queries`. The review group and review request equeries have been updated to take flags indicating whether permission lookup queries are expected. This would be disabled if they've already been fetched by this point (since they're cached). There's a little bit of related cleanup in parts, changing where some logic (e.g., superuser checks for review group access queries) lives and better reusing state from expected Q results for prep equeries. These will be important for upcoming changes.
f8f4984e15350f2a7430dc88c380dab96d9f9b3a Christian Hammond
reviewboard/accounts/testing/queries.py
reviewboard/reviews/testing/queries/review_groups.py
reviewboard/reviews/testing/queries/review_requests.py
Loading...