Eliminate JOINs when determining LocalSite user membership.

Review Request #12351 — Created June 10, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This updates the new User.get_local_site_stats() method to avoid
having to perform JOINs between a User and a LocalSite by way of
users or admins. We now use the through tables instead to build
the query. This simplifies the queries and allows the database to more
easily make use of the indexes established on these tables.

Unit tests pass.

Commits

Files