discourse/app
David Taylor 0d0d78841b
FIX: Remove `plugin.enabled?` checks at initialization time (#6166)
Checking `plugin.enabled?` while initializing plugins causes issues in two ways:
  - An application restart is required for changes to take effect. A load-balanced multi-server environment could behave very weirdly if containers restart at different times.
  - In a multisite environment, it takes the `enabled?` setting from the default site. Changes on that site affect all other sites in the cluster.

Instead, `plugin.enabled?` should be checked at runtime, in the context of a request. This commit removes `plugin.enabled?` from many `instance.rb` methods.

I have added a working `plugin.enabled?` implementation for methods that actually affect security/functionality:
  - `post_custom_fields_whitelist`
  - `whitelist_staff_user_custom_field`
  - `add_permitted_post_create_param`
2018-07-25 16:44:09 +01:00
..
assets FEATURE: Add revoke and reconnect functionality for google logins 2018-07-25 16:03:14 +01:00
controllers FIX: Remove `plugin.enabled?` checks at initialization time (#6166) 2018-07-25 16:44:09 +01:00
helpers Move into MiniSQLMultisiteConnection, and add test for rollback 2018-07-24 09:41:55 +01:00
jobs FIX: makes disk_space computation more resilient (#6172) 2018-07-25 11:04:01 -04:00
mailers PERF: reduce querying when creating notifications 2018-07-11 12:38:11 +10:00
models FIX: Remove `plugin.enabled?` checks at initialization time (#6166) 2018-07-25 16:44:09 +01:00
serializers PERF: Move `EmailLog#reply_key` into new `post_reply_keys` table. 2018-07-24 13:51:53 +08:00
services FEATURE: List, revoke and reconnect associated accounts. Phase 1 (#6099) 2018-07-23 16:51:57 +01:00
views FIX: categories page crawler view had incorrect URLs 2018-07-23 14:54:41 -04:00