mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
The privileges of a user should never change within a request life cycle. The `spree_roles` association is very small, between 0 and 2 items are quickly searched in memory without the need of additional database queries. From memory, I've seen a lot of spree_roles queries in log files per request. This should reduce it to one.