DEV: Convert approve_unless_trust_level to groups (#24357)

This change converts the `approve_unless_trust_level` site setting to
`approve_unless_allowed_groups`.

See: https://meta.discourse.org/t/283408

- Adds the new site setting
- Adds a deprecation warning
- Updates core to use the new settings.
- Adds a migration to fill in the new setting of the old setting was
  changed
- Adds an entry to the site_setting.keywords section
- Updates many tests to account for the new change

After a couple of months we will remove the `approve_unless_trust_level`
setting entirely.

Internal ref: /t/115696
This commit is contained in:
Blake Erickson
2023-11-21 11:31:42 -07:00
committed by GitHub
parent b19b4b4215
commit 447d9b2105
15 changed files with 80 additions and 26 deletions

View File

@ -10,7 +10,7 @@ RSpec.describe Email::Processor do
context "when reply via email is too short" do
let(:mail) { file_from_fixtures("chinese_reply.eml", "emails").read }
fab!(:post)
fab!(:user) { Fabricate(:user, email: "discourse@bar.com") }
fab!(:user) { Fabricate(:user, email: "discourse@bar.com", refresh_auto_groups: true) }
fab!(:post_reply_key) do
Fabricate(