FEATURE: Support designating multiple groups as mods on category (#28655)

Currently, categories support designating only 1 group as a moderation group on the category. This commit removes the one group limitation and makes it possible to designate multiple groups as mods on a category.

Internal topic: t/124648.
This commit is contained in:
Osama Sayegh
2024-09-04 04:38:46 +03:00
committed by GitHub
parent 7092d88ee4
commit 280adda09c
49 changed files with 388 additions and 273 deletions

View File

@@ -26,17 +26,13 @@ class CategorySerializer < SiteCategorySerializer
:custom_fields,
:topic_featured_link_allowed,
:search_priority,
:reviewable_by_group_name,
:moderating_group_ids,
:default_slow_mode_seconds
has_one :category_setting, serializer: CategorySettingSerializer, embed: :objects
def reviewable_by_group_name
object.reviewable_by_group.name
end
def include_reviewable_by_group_name?
SiteSetting.enable_category_group_moderation? && object.reviewable_by_group_id.present?
def include_moderating_group_ids?
SiteSetting.enable_category_group_moderation?
end
def include_category_setting?