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
..
admin FEATURE: Ability to clear a user's penalty history 2018-05-25 12:54:22 -04:00
users FIX: returns provider_not_enabled error even if enabled 2018-07-16 11:08:48 +01:00
about_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
application_controller.rb fix the build 2018-05-26 03:11:10 +02:00
badges_controller.rb PERF: N+1 queries on badges page. 2018-03-19 14:36:09 +08:00
categories_controller.rb Missing specs for Group, Tag, Category and Flag web hooks. 2018-05-21 17:29:58 +08:00
category_hashtags_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
clicks_controller.rb FIX: show an error page on click tracking error 2018-03-17 00:33:11 +01:00
composer_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
composer_messages_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
directory_items_controller.rb make 🤖 rubocop happy 2018-05-16 16:35:04 +02:00
draft_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
email_controller.rb FIX: stop adding email to unsubscribe url 2018-05-22 09:07:03 +10:00
embed_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
exceptions_controller.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
export_csv_controller.rb FIX: create upload record for exported csv files 2018-04-20 00:27:49 +05:30
extra_locales_controller.rb simplify production switch and serve extra locales from actual site 2018-01-10 08:19:51 +11:00
finish_installation_controller.rb PERF: PG queries for the UserEmail#email column was not using the index. 2018-03-19 11:31:14 +08:00
forums_controller.rb PERF: add frozen strings 2018-01-15 12:44:54 +11:00
groups_controller.rb Missing specs for Group, Tag, Category and Flag web hooks. 2018-05-21 17:29:58 +08:00
highlight_js_controller.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
inline_onebox_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
invites_controller.rb FIX: better handling of invite links after they are redeemed 2018-05-08 20:17:57 +05:30
list_controller.rb FIX: parameterize tag_id 2018-04-14 16:42:53 +05:30
metadata_controller.rb FIX: If we have no logo defined use sketch in manifest 2018-05-22 12:10:59 +10:00
notifications_controller.rb fix the build 2018-05-26 03:11:10 +02:00
offline_controller.rb FIX: offline controller regression 2017-10-31 15:44:50 +11:00
onebox_controller.rb FIX: include title in local onebox when linking to a different topic 2018-02-19 22:40:14 +01:00
permalinks_controller.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
post_action_users_controller.rb UX: cap likes 2 (#5237) 2017-11-15 11:28:54 +11:00
post_actions_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
posts_controller.rb FIX: Remove plugin.enabled? checks at initialization time (#6166) 2018-07-25 16:51:45 +01:00
push_notification_controller.rb Feature: Push notifications for Android (#5792) 2018-05-04 15:31:48 -07:00
queued_posts_controller.rb FIX: Error if queued post not found while updating 2017-11-27 19:25:51 +05:30
qunit_controller.rb DEV: remove qunit rails fork and add a couple of async tests 2018-04-23 16:42:40 +10:00
robots_txt_controller.rb FEATURE: An API to help sites build robots.txt files programatically 2018-04-16 15:43:20 -04:00
safe_mode_controller.rb Allow staff members to enable safe mode, even if disabled 2018-04-25 11:49:57 -04:00
search_controller.rb FEATURE: support search click through tracking for user, category and tags 2017-12-01 12:04:55 +05:30
session_controller.rb FIX: avatar_url includes upload_path twice when local storage used 2018-06-12 11:48:04 -04:00
similar_topics_controller.rb display 'similar to' earlier when composing a post 2017-09-16 01:03:29 +02:00
site_controller.rb FEATURE: custom setting for large square site icon 2017-11-03 16:19:31 +11:00
static_controller.rb FIX: update cache times for service workers 2018-05-14 12:29:24 -07:00
steps_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
stylesheets_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
tag_groups_controller.rb FIX: tags in a 'visible by everyone but usable only by staff' group weren't visible by everyone 2018-05-16 09:48:19 +02:00
tags_controller.rb Missing specs for Group, Tag, Category and Flag web hooks. 2018-05-21 17:29:58 +08:00
themes_controller.rb
topics_controller.rb FIX: in rare conditions post timing would miss the user 2018-05-24 15:38:33 +10:00
uploads_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
user_actions_controller.rb FIX: Remove mentions filters from user and groups 2017-12-07 16:29:02 -05:00
user_api_keys_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
user_avatars_controller.rb FEATURE: limit assets less that non asset paths 2018-03-06 15:20:39 +11:00
user_badges_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
users_controller.rb FIX: Update activation email route was returning a generic json error. 2018-05-31 14:19:43 +08:00
users_email_controller.rb Review Changes for f4f8a293e7. 2018-02-21 14:55:49 +08:00
webhooks_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
wizard_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00