mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Account for moderators in group to TL mapping (#25326)
If configuring only moderators in a group based access setting, the mapping to the old setting wouldn't work correctly, because the case was unaccounted for. This PR accounts for moderators group when doing the mapping.
This commit is contained in:
@ -152,6 +152,11 @@ RSpec.xdescribe SiteSettings::DeprecatedSettings do
|
||||
)
|
||||
end
|
||||
|
||||
it "returns moderator if there is only the moderators auto group in the new group setting" do
|
||||
SiteSetting.invite_allowed_groups = "#{Group::AUTO_GROUPS[:moderators]}"
|
||||
expect(SiteSetting.min_trust_level_to_allow_invite_tl_and_staff).to eq("moderator")
|
||||
end
|
||||
|
||||
it "returns staff if there are staff and admin auto groups in the new group setting" do
|
||||
SiteSetting.invite_allowed_groups =
|
||||
"#{Group::AUTO_GROUPS[:admins]}|#{Group::AUTO_GROUPS[:staff]}"
|
||||
|
Reference in New Issue
Block a user