mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: scope memoization of category moderation per category (#17786)
This commit is contained in:
@ -112,8 +112,8 @@ class Guardian
|
||||
def is_category_group_moderator?(category)
|
||||
return false unless category
|
||||
return false unless authenticated?
|
||||
|
||||
@is_category_group_moderator ||= begin
|
||||
@is_category_group_moderator ||= {}
|
||||
@is_category_group_moderator[category.id] ||= begin
|
||||
SiteSetting.enable_category_group_moderation? &&
|
||||
category.present? &&
|
||||
category.reviewable_by_group_id.present? &&
|
||||
|
Reference in New Issue
Block a user