mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:11:13 +08:00
DEV: Convert min_trust_level_to_tag_topics to groups (#25273)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_to_tag_topics site setting to tag_topic_allowed_groups.
This commit is contained in:
@ -106,7 +106,7 @@ RSpec.describe TopicCreator do
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
SiteSetting.create_tag_allowed_groups = Group::AUTO_GROUPS[:trust_level_0]
|
||||
SiteSetting.min_trust_level_to_tag_topics = 0
|
||||
SiteSetting.tag_topic_allowed_groups = Group::AUTO_GROUPS[:trust_level_0]
|
||||
end
|
||||
|
||||
context "with regular tags" do
|
||||
@ -214,7 +214,7 @@ RSpec.describe TopicCreator do
|
||||
end
|
||||
|
||||
it "lets new user create a topic if they don't have sufficient trust level to tag topics" do
|
||||
SiteSetting.min_trust_level_to_tag_topics = 1
|
||||
SiteSetting.tag_topic_allowed_groups = Group::AUTO_GROUPS[:trust_level_1]
|
||||
new_user = Fabricate(:newuser, refresh_auto_groups: true)
|
||||
topic =
|
||||
TopicCreator.create(
|
||||
|
Reference in New Issue
Block a user