mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Convert min_trust_to_create_topic to groups (#24740)
This change converts the min_trust_to_create_topic site setting to create_topic_allowed_groups. See: https://meta.discourse.org/t/283408 - Hides the old setting - Adds the new site setting - Add a deprecation warning - Updates to use the new setting - Adds a migration to fill in the new setting if the old setting was changed - Adds an entry to the site_setting.keywords section - Updates tests to account for the new change - After a couple of months, we will remove the min_trust_to_create_topicsetting entirely. Internal ref: /t/117248
This commit is contained in:

committed by
GitHub

parent
1017820012
commit
702d0620d7
@ -127,7 +127,7 @@ RSpec.describe Email::Receiver do
|
||||
|
||||
describe "creating whisper post in PMs for staged users" do
|
||||
let(:email_address) { "linux-admin@b-s-c.co.jp" }
|
||||
fab!(:user1) { Fabricate(:user) }
|
||||
fab!(:user1) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
let(:user2) { Fabricate(:staged, email: email_address) }
|
||||
let(:topic) do
|
||||
Fabricate(
|
||||
@ -282,7 +282,7 @@ RSpec.describe Email::Receiver do
|
||||
describe "reply" do
|
||||
let(:reply_key) { "4f97315cc828096c9cb34c6f1a0d6fe8" }
|
||||
fab!(:category)
|
||||
fab!(:user) { Fabricate(:user, email: "discourse@bar.com") }
|
||||
fab!(:user) { Fabricate(:user, email: "discourse@bar.com", refresh_auto_groups: true) }
|
||||
fab!(:topic) { create_topic(category: category, user: user) }
|
||||
fab!(:post) { create_post(topic: topic) }
|
||||
|
||||
@ -1952,7 +1952,7 @@ RSpec.describe Email::Receiver do
|
||||
context "when email is a reply" do
|
||||
let(:reply_key) { "4f97315cc828096c9cb34c6f1a0d6fe8" }
|
||||
fab!(:category)
|
||||
fab!(:user) { Fabricate(:user, email: "discourse@bar.com") }
|
||||
fab!(:user) { Fabricate(:user, email: "discourse@bar.com", refresh_auto_groups: true) }
|
||||
fab!(:user2) { Fabricate(:user, email: "someone_else@bar.com") }
|
||||
fab!(:topic) { create_topic(category: category, user: user) }
|
||||
fab!(:post) { create_post(topic: topic, user: user) }
|
||||
|
Reference in New Issue
Block a user