DEV: Convert min_trust_level_to_create_tag to groups (#24899)

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_create_tag  site setting to create_tag_allowed_groups.

This PR maintains backwards compatibility until we can update plugins and themes using this.
This commit is contained in:
Ted Johansson
2024-01-05 10:19:43 +08:00
committed by GitHub
parent 2594f7a5a3
commit a5f0935307
17 changed files with 90 additions and 33 deletions

View File

@ -34,6 +34,7 @@ module SiteSettings::DeprecatedSettings
["min_trust_level_to_allow_invite", "invite_allowed_groups", false, "3.3"],
["min_trust_level_to_allow_ignore", "ignore_allowed_groups", false, "3.3"],
["min_trust_to_allow_self_wiki", "self_wiki_allowed_groups", false, "3.3"],
["min_trust_to_create_tag", "create_tag_allowed_groups", false, "3.3"],
]
OVERRIDE_TL_GROUP_SETTINGS = %w[
@ -52,6 +53,7 @@ module SiteSettings::DeprecatedSettings
min_trust_level_to_allow_user_card_background
min_trust_level_to_allow_invite
min_trust_level_to_allow_ignore
min_trust_to_create_tag
]
def group_to_tl(old_setting, new_setting)