discourse/spec/serializers
Martin Brennan e62e93f83a
FEATURE: Introduce personal_message_enabled_groups setting (#18042)
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.
2022-09-26 13:58:40 +10:00
..
about_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
admin_plugin_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
admin_user_list_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
basic_group_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
basic_group_user_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
basic_post_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
basic_reviewable_flagged_post_serializer_spec.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_reviewable_queued_post_serializer_spec.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_reviewable_serializer_spec.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_reviewable_user_serializer_spec.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_user_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
category_detailed_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
category_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
category_upload_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
current_user_serializer_spec.rb DEV: Ship first pass of new user page navigation behind feature flag (#18285) 2022-09-21 12:32:47 +08:00
directory_item_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
emoji_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
found_user_serializer_spec.rb DEV: return user status on the user search route (#17716) 2022-08-09 14:54:33 +04:00
found_user_with_status_serializer_spec.rb DEV: return user status on the user search route (#17716) 2022-08-09 14:54:33 +04:00
group_show_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
listable_topic_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
new_post_result_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
notification_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
pending_post_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
post_revision_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
post_serializer_spec.rb FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
reviewable_flagged_post_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
reviewable_queued_post_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_score_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
reviewable_serializer_spec.rb DEV: Use AR enums in reviewables related code 2022-09-22 14:44:27 +02:00
reviewable_user_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
single_sign_on_record_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
site_serializer_spec.rb FEATURE: anonymous sidebar categories and tags (#18038) 2022-08-23 16:20:46 +08:00
suggested_topic_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
tag_group_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
theme_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
topic_link_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_list_item_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_list_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
topic_tracking_state_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_view_details_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_view_posts_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
topic_view_serializer_spec.rb FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
upload_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
user_auth_token_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_bookmark_list_serializer_spec.rb FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
user_card_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
user_post_bookmark_serializer_spec.rb DEV: Add bookmarks tab to the new user menu (#17814) 2022-08-08 17:24:04 +03:00
user_serializer_spec.rb DEV: Route PM only tags to PM tags show route (#17870) 2022-08-12 11:26:56 +08:00
user_summary_serializer_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
web_hook_post_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
web_hook_topic_view_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
web_hook_user_serializer_spec.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
wizard_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00