mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:41:25 +08:00
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:
@ -364,9 +364,13 @@ class PostActionCreator
|
||||
create_args[:subtype] = TopicSubtype.notify_moderators
|
||||
create_args[:target_group_names] = [Group[:moderators].name]
|
||||
|
||||
if SiteSetting.enable_category_group_moderation? &&
|
||||
@post.topic&.category&.reviewable_by_group_id?
|
||||
create_args[:target_group_names] << @post.topic.category.reviewable_by_group.name
|
||||
if SiteSetting.enable_category_group_moderation? && @post.topic&.category
|
||||
create_args[:target_group_names].push(
|
||||
*Group
|
||||
.joins(:category_moderation_groups)
|
||||
.where("category_moderation_groups.category_id": @post.topic.category.id)
|
||||
.pluck(:name),
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user