discourse/app/controllers
David Taylor 6520697b5c 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:51:45 +01:00
..
2018-05-26 03:11:10 +02:00
2018-05-16 16:35:04 +02:00
2018-04-02 13:52:51 +08:00
2018-01-15 12:44:54 +11:00
2018-04-14 16:42:53 +05:30
2018-05-26 03:11:10 +02:00