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
..
2018-05-01 15:43:49 +02:00
2018-07-06 17:16:40 -05:00
2018-06-07 13:28:18 +08:00
2017-07-28 10:20:09 +09:00
2018-04-02 13:52:51 +08:00
2018-06-07 13:28:18 +08:00
2017-07-28 10:20:09 +09:00
2017-09-08 14:07:24 +08:00
2018-06-07 13:28:18 +08:00
2018-06-07 13:28:18 +08:00
2018-07-24 12:00:34 -04:00
2017-07-28 10:20:09 +09:00
2018-06-07 13:28:18 +08:00
2018-06-07 13:28:18 +08:00
2018-02-26 10:25:58 +11:00
2018-06-08 13:56:20 -04:00
2018-04-25 08:44:07 +10:00
2018-06-07 13:28:18 +08:00
2017-07-03 15:26:57 -04:00
2018-04-18 11:32:32 +05:30
2018-04-02 13:52:51 +08:00
2018-06-07 13:28:18 +08:00
2018-06-07 13:28:18 +08:00
2017-07-28 10:20:09 +09:00
2018-06-21 10:41:52 -04:00
2017-07-28 10:20:09 +09:00