DEV: Convert approve_new_topics_unless_trust_level to groups (#24504)

* DEV: Convert approve_new_topics_unless_trust_level to groups

This change converts the `approve_new_topics_unless_trust_level` site
setting to `approve_new_topics_unless_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
`approve_new_topics_unless_trust_level` setting entirely.

Internal ref: /t/115696

* add missing translation

* Add keyword entry

* Add migration
This commit is contained in:
Blake Erickson
2023-11-22 10:44:59 -07:00
committed by GitHub
parent c766125fe8
commit 8a45f84277
7 changed files with 58 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ class ReviewableScoreSerializer < ApplicationSerializer
trust_level: "approve_unless_trust_level",
group: "approve_unless_allowed_groups",
new_topics_unless_trust_level: "approve_new_topics_unless_trust_level",
new_topics_unless_allowed_groups: "approve_new_topics_unless_allowed_groups",
fast_typer: "min_first_post_typing_time",
auto_silence_regex: "auto_silence_first_post_regex",
staged: "approve_unless_staged",