discourse/config
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
..
cloud/cloud66
environments FEATURE: Allow configuration of smtp timeout settings (#17863) 2022-08-15 12:14:09 -03:00
initializers DEV: Remove support for legacy plugin JS compilation pipeline (#18293) 2022-09-21 12:38:02 +01:00
locales FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
application.rb FIX: Allow Symbol objects to be deserialized in PostRevision (#17510) 2022-07-15 13:14:57 +01:00
boot.rb Revert "DEV: Improve multisite db scripts in dev (#17337)" (#17801) 2022-08-04 16:15:06 -05:00
cdn.yml.sample
database.yml Revert "DEV: Improve multisite db scripts in dev (#17337)" (#17801) 2022-08-04 16:15:06 -05:00
deploy.rb.sample
dev_defaults.yml DEV: Fix typos and outdated comments (#16614) 2022-05-04 14:12:18 +08:00
discourse.config.sample
discourse.pill.sample
discourse_defaults.conf DEV: Declare new SMTP settings from 3a37a7f (#17932) 2022-08-15 13:45:23 -03:00
environment.rb DEV: Upgrade to Rails 7 2022-04-28 11:51:03 +02:00
logrotate.conf
multisite.yml.production-sample
nginx.global.conf
nginx.sample.conf SECURITY: Do not cache error responses for static assets (#17693) 2022-07-27 16:41:44 -03:00
projections.json
puma.rb DEV: Allow changing APP_ROOT for puma via ENV variable (#15744) 2022-06-17 11:58:04 -04:00
routes.rb Fix constraints typo in routes config (#17994) 2022-08-24 10:27:05 +08:00
sidekiq.yml
site_settings.yml FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
spring.rb
thin.yml.sample
unicorn.conf.rb DEV: Avoid `$` globals (#15453) 2022-01-08 23:39:46 +01:00
unicorn_launcher
unicorn_upstart.conf