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

@ -3407,8 +3407,9 @@ RSpec.describe User do
user.update!(groups: [group])
SiteSetting.enable_category_group_moderation = true
group_reviewable =
Fabricate(:reviewable, reviewable_by_moderator: false, reviewable_by_group: group)
category = Fabricate(:category)
Fabricate(:category_moderation_group, category:, group:)
group_reviewable = Fabricate(:reviewable, reviewable_by_moderator: false, category:)
mod_reviewable = Fabricate(:reviewable, reviewable_by_moderator: true)
admin_reviewable = Fabricate(:reviewable, reviewable_by_moderator: false)