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

Affected version
2.0.4

Xon

Well-known member
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.
 
Top