Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brent-hoover
Copy link
Collaborator

Resolves #NA
Impact: minor
Type: feature

Issue

There is no good and easy way to disable a plugin through configuration

Solution

Keep a list of disabled plugins and don't load/import any of those

Breaking changes

None

Testing

  1. Start Reaction and observe no problems
  2. Edit .reaction/pluginConfigs and add search-mongo to the array for disabledPlugins.
  3. Restart Reaction
  4. Observe that the mongo search is disabled

@brent-hoover brent-hoover requested a review from aldeed March 11, 2019 07:06
@@ -0,0 +1,5 @@
const disabledPlugins = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment above here explaining what goes in the array? At first glance I would have thought the plugin's name, but it looks like actually the directory name.

Also, should we gitignore this file? (after this initial commit)

@brent-hoover
Copy link
Collaborator Author

@aldeed I wonder if sort of tangential to this if we should move all the collection creation stuff for search-mongo so that those Collections are never created if the plugin is disabled?

@aldeed
Copy link
Contributor

aldeed commented Mar 11, 2019

@zenweasel Yes as a general rule we need to get all collection creation moved into the related plugin startup. It would be done soon as part of #4996 if not now

@brent-hoover
Copy link
Collaborator Author

@aldeed Requested changes made

@brent-hoover brent-hoover requested a review from aldeed March 12, 2019 00:47
@aldeed aldeed merged commit 985c471 into develop Mar 12, 2019
@aldeed aldeed deleted the feat-brent-disable-plugins-take-three branch March 12, 2019 18:07
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants