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 2 (Latest)

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.
553f39eaad955d7e24df16cf13c8ea822ed9d125 Christian Hammond
reviewboard/accounts/testing/queries.py
reviewboard/reviews/testing/queries/review_groups.py
reviewboard/reviews/testing/queries/review_requests.py
Loading...