Partial fix findModeratorsForList can cause N+1 queries for moderator permission checks

Xon

Well-known member
Affected version
2.0.4
When viewing reports, findModeratorsForList's with clause includes the 'User' but not 'User.PermissionCombination'. As such if canViewContent touches a visitor's global permission set, this can triggers an additional query per moderator who exists.

A simple problem exists if canViewContent touches node permissions as well.
 
Back
Top Bottom