mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
DEV: Convert min_trust_level_to_tag_topics to groups (#25258)
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:
@ -2225,6 +2225,7 @@ RSpec.describe PostMover do
|
||||
|
||||
it "can add tags to new message when staff group is included in pm_tags_allowed_for_groups" do
|
||||
SiteSetting.pm_tags_allowed_for_groups = "1|2|3"
|
||||
SiteSetting.tag_topic_allowed_groups = "1|2|3"
|
||||
personal_message.move_posts(
|
||||
admin,
|
||||
[p2.id, p5.id],
|
||||
|
@ -239,7 +239,7 @@ RSpec.describe ReviewableQueuedPost, type: :model 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 "when editing" do
|
||||
|
@ -17,7 +17,7 @@ RSpec.describe Tag do
|
||||
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
SiteSetting.min_trust_level_to_tag_topics = 0
|
||||
SiteSetting.tag_topic_allowed_groups = Group::AUTO_GROUPS[:trust_level_0]
|
||||
end
|
||||
|
||||
describe "Associations" do
|
||||
|
@ -5,7 +5,7 @@ RSpec.describe TagUser 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
|
||||
|
||||
def regular
|
||||
|
@ -8,7 +8,7 @@ RSpec.describe TopicEmbed do
|
||||
it { is_expected.to validate_presence_of :embed_url }
|
||||
|
||||
describe ".import" do
|
||||
fab!(:user)
|
||||
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
let(:title) { "How to turn a fish from good to evil in 30 seconds" }
|
||||
let(:url) { "http://eviltrout.com/123" }
|
||||
let(:contents) do
|
||||
|
Reference in New Issue
Block a user