DEV: Convert email_in_min_trust to groups (#24515)

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

Internal ref: /t/115696
This commit is contained in:
Blake Erickson
2023-11-22 18:03:28 -07:00
committed by GitHub
parent 189aa5fa4e
commit c89edd9e86
6 changed files with 86 additions and 13 deletions
+3
View File
@@ -2140,6 +2140,8 @@ en:
log_mail_processing_failures: "Log all email processing failures to <a href='%{base_path}/logs' target='_blank'>/logs</a>"
email_in: "Allow users to post new topics via email. After enabling this setting, you will be able to configure incoming email addresses for groups and categories."
email_in_min_trust: "The minimum trust level a user needs to have to be allowed to post new topics via email."
email_in_allowed_groups: "Groups that are allowed to post new topics via email."
email_in_authserv_id: "The identifier of the service doing authentication checks on incoming emails. See <a href='https://meta.discourse.org/t/134358'>https://meta.discourse.org/t/134358</a> for instructions on how to configure this."
email_in_spam_header: "The email header to detect spam."
@@ -2547,6 +2549,7 @@ en:
shared_drafts_allowed_groups: "shared_drafts_min_trust_level"
approve_unless_allowed_groups: "approve_unless_trust_level"
approve_new_topics_unless_allowed_groups: "approve_new_topics_unless_trust_level"
email_in_allowed_groups: "email_in_min_trust"
placeholder:
discourse_connect_provider_secrets:
+7
View File
@@ -1254,6 +1254,13 @@ email:
email_in_min_trust:
default: 2
enum: "TrustLevelSetting"
hidden: true
email_in_allowed_groups:
default: 12
type: group_list
allow_any: false
refresh: true
validator: "AtLeastOneGroupValidator"
email_in_authserv_id:
default: ""
email_in_spam_header: