Commit Graph

125 Commits

Author SHA1 Message Date
David Taylor
6f5b8f61df FIX: Remove return statement from inside block 2018-07-26 16:00:45 +01:00
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
Dax74
5bd38e3a29
Add Github Linkback plugin 2018-05-31 01:02:35 +02:00
Joshua Rosenfeld
4ad924bcf5
Add discourse-policy as official plugin 2018-05-29 16:57:05 -04:00
jomaxro
be01491c04 Revert "Correct BBCode plugin name"
This reverts commit 10dfdd7d2a.
2018-05-19 20:03:49 -04:00
Joshua Rosenfeld
10dfdd7d2a
Correct BBCode plugin name 2018-05-19 19:53:39 -04:00
Guo Xiang Tan
c6f45fcfdb Expose an API for plugins to be hidden on the admin plugin page. 2018-05-08 13:24:58 +08:00
Guo Xiang Tan
8cf0f51eb2 UX: Display site settings shortcut for poll and discourse-nginx-performance-report.
https://meta.discourse.org/t/improving-admin-plugins/84585/29?u=tgxworld
2018-05-08 10:34:32 +08:00
Sam
c81854ad14 FEATURE: Rename discourse-cronos to discourse-local-dates 2018-05-04 16:11:50 +10:00
Joffrey JAFFEUX
78435833a5
FEATURE: discourse-cronos is now a core plugin 2018-05-03 20:15:57 +02:00
Robin Ward
93b40d5e59 Don't use puts here since it happens in tests 2018-04-30 12:26:43 -04:00
Neil Lalonde
e52d914c08 add discourse-user-card-badges to official plugins 2018-04-26 15:28:06 -04:00
Sam
98d142b1c1 also causes test failure, removing 2018-04-26 13:48:44 +10:00
Sam
0a82d739f9 unofficialize plugin 2018-04-26 13:23:14 +10:00
Sam
4ded5e18e6 add more official plugins 2018-04-26 12:33:07 +10:00
Gerhard Schlager
afe1a2793d Mark discourse-signatures plugin as official 2018-04-25 11:58:39 +02:00
Guo Xiang Tan
0e38481d6d Add docker_manager to official plugin list. 2018-04-25 13:02:50 +08:00
Guo Xiang Tan
bf6e548692 Remove plugin that is internal to us. 2018-04-24 11:07:49 -04:00
Guo Xiang Tan
80847d83a8 Mark discourse-voting and discourse-staff-notes as official. 2018-04-23 09:26:13 +08:00
Robin Ward
cfcdc4b420 Output when a locale is invalid 2018-04-20 15:29:18 -04:00
Joffrey JAFFEUX
45f657336e
FEATURE: adds support for loading existing core asset in pretty text 2018-04-10 08:37:16 +02:00
Guo Xiang Tan
2ddcdf8704 UX: Add an icon to indicate if a plugin is official.
https://meta.discourse.org/t/improving-admin-plugins/84585
2018-04-06 10:54:58 +08:00
Guo Xiang Tan
76e2b6c825 Add "discourse-assign" to the list of official plugins. 2018-03-06 21:45:37 +08:00
Gerhard Schlager
eb52c5469e FEATURE: Allow plugins to register a new locale 2018-01-25 14:57:41 +01:00
Jeff Wong
b094894c94 Feature: Add service worker registration method to plugin API 2017-11-28 14:01:41 +08:00
Robin Ward
966c7e7f07 FEATURE: Allow plugins to dynamically add seed fixture paths
This is useful if your plugin wants different seed data for different
locales for example.
2017-11-16 14:43:17 -05:00
Guo Xiang Tan
5c8dac3ae5 Replace discourse-slack-official with discourse-chat-integration. 2017-10-24 09:44:11 +08:00
Sam
d4d5e6965e FEATURE: discourse-prometheus is an official plugin 2017-10-24 10:27:28 +11:00
Robin Ward
838568cbc3 Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
Robin Ward
823936ca9c A plugin API to catch exceptions 2017-10-02 12:05:12 -04:00
Robin Ward
34f98f362f Add a plugin hook to specify a class on the body of the document 2017-09-28 13:17:09 -04:00
Guo Xiang Tan
77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Robin Ward
e7885c20cb Add reloadable support for patching in an avatar lookup 2017-08-30 14:24:03 -04:00
Guo Xiang Tan
2157079d09 Add Plugin API to register a category custom field. 2017-08-17 15:59:57 +09:00
Régis Hanol
55f449edc5 FIX: reloading issues with classes 2017-08-16 23:00:52 +02:00
Robin Ward
5ed809a15b FIX: Reloading issues with classes 2017-08-13 13:19:50 -04:00
Régis Hanol
51ef36abb4 Add a bunch of reload-friendly class variables accessors plugin APIs 2017-08-12 04:21:02 +02:00
Régis Hanol
75e4f7f896 Shorten some very long lines
Prevent warnings from already defined constants when reloading
2017-08-12 04:18:04 +02:00
Régis Hanol
04460ecac5 'add_to_serializer' should define the 'include_' method by default 2017-08-09 22:22:18 +02:00
Robin Ward
f11253dcb6 Allow plugin patches to reload in development mode 2017-08-09 12:30:27 -04:00
Robin Ward
43fd90b2da Remove serve_public_dir -- it's not needed 2017-07-28 13:44:38 -04:00
Robin Ward
5ae79697b8 Remove unused register_theme code, expose serve_public 2017-07-28 11:47:25 -04:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam
b92e181390 FEATURE: rake plugin:install_all_official
use this task to quickly install all official plugins
GIT_WRITE=1 to enable write access to repos (discourse staff only)
2017-07-18 12:09:27 -04:00
Sam
6a1f579c6e FIX: don't search for plugins in nested subdirectories 2017-05-16 17:28:56 -04:00
Robin Ward
1363988cd7 Support for an HTML builder that can create dynamic HTML 2017-04-17 17:32:55 -04:00
Régis Hanol
747f4812e4 fix custom emoji support when using subfolder 2017-03-24 02:09:39 +01:00
Régis Hanol
9f65658c5c register_emoji should work with subfolder installs 2017-03-24 01:08:12 +01:00
Guo Xiang Tan
e7c972ac89 FIX: Don't use backticks that take in inputs. 2017-03-17 15:33:51 +08:00
Robin Ward
9c9e0f5eca FIX: Move the middleware 2017-01-18 18:22:03 -05:00