mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:33:44 +08:00
e62e93f83a
This will replace `enable_personal_messages` and `min_trust_to_send_messages`, this commit introduces the setting `personal_message_enabled_groups` and uses it in all places that `enable_personal_messages` and `min_trust_to_send_messages` currently apply. A migration is included to set `personal_message_enabled_groups` based on the following rules: * If `enable_personal_messages` was false, then set `personal_message_enabled_groups` to `3`, which is the staff auto group * If `min_trust_to_send_messages` is not default (1) and the above condition is false, then set the `personal_message_enabled_groups` setting to the appropriate auto group based on the trust level * Otherwise just set `personal_message_enabled_groups` to 11 which is the TL1 auto group After follow-up PRs to plugins using these old settings, we will be able to drop the old settings from core, in the meantime I've added DEPRECATED notices to their descriptions and added them to the deprecated site settings list. This commit also introduces a `_map` shortcut method definition for all `group_list` site settings, e.g. `SiteSetting.personal_message_enabled_groups` also has `SiteSetting.personal_message_enabled_groups_map` available, which automatically splits the setting by `|` and converts it into an array of integers. |
||
---|---|---|
.. | ||
about_serializer_spec.rb | ||
admin_plugin_serializer_spec.rb | ||
admin_user_list_serializer_spec.rb | ||
basic_group_serializer_spec.rb | ||
basic_group_user_serializer_spec.rb | ||
basic_post_serializer_spec.rb | ||
basic_reviewable_flagged_post_serializer_spec.rb | ||
basic_reviewable_queued_post_serializer_spec.rb | ||
basic_reviewable_serializer_spec.rb | ||
basic_reviewable_user_serializer_spec.rb | ||
basic_user_serializer_spec.rb | ||
category_detailed_serializer_spec.rb | ||
category_serializer_spec.rb | ||
category_upload_serializer_spec.rb | ||
current_user_serializer_spec.rb | ||
directory_item_serializer_spec.rb | ||
emoji_serializer_spec.rb | ||
found_user_serializer_spec.rb | ||
found_user_with_status_serializer_spec.rb | ||
group_show_serializer_spec.rb | ||
listable_topic_serializer_spec.rb | ||
new_post_result_serializer_spec.rb | ||
notification_serializer_spec.rb | ||
pending_post_serializer_spec.rb | ||
post_revision_serializer_spec.rb | ||
post_serializer_spec.rb | ||
reviewable_flagged_post_serializer_spec.rb | ||
reviewable_queued_post_serializer_spec.rb | ||
reviewable_score_serializer_spec.rb | ||
reviewable_serializer_spec.rb | ||
reviewable_user_serializer_spec.rb | ||
single_sign_on_record_serializer_spec.rb | ||
site_serializer_spec.rb | ||
suggested_topic_serializer_spec.rb | ||
tag_group_serializer_spec.rb | ||
theme_serializer_spec.rb | ||
topic_link_serializer_spec.rb | ||
topic_list_item_serializer_spec.rb | ||
topic_list_serializer_spec.rb | ||
topic_tracking_state_serializer_spec.rb | ||
topic_view_details_serializer_spec.rb | ||
topic_view_posts_serializer_spec.rb | ||
topic_view_serializer_spec.rb | ||
upload_serializer_spec.rb | ||
user_auth_token_serializer_spec.rb | ||
user_bookmark_list_serializer_spec.rb | ||
user_card_serializer_spec.rb | ||
user_post_bookmark_serializer_spec.rb | ||
user_serializer_spec.rb | ||
user_summary_serializer_spec.rb | ||
web_hook_post_serializer_spec.rb | ||
web_hook_topic_view_serializer_spec.rb | ||
web_hook_user_serializer_spec.rb | ||
wizard_serializer_spec.rb |