CodeCompass icon indicating copy to clipboard operation
CodeCompass copied to clipboard

Allow enabling and disabling plugins at server start in a more generic way

Open whisperity opened this issue 7 years ago • 0 comments

Currently there is no way to disable a plugin for individually started servers apart from removing the appropriate shared objects from the install directory. A more versatile --enable/--disable command should be added, which works in the following way:

  • The actual handler for the particular plugin is not instantiated. (Perhaps the plugin itself shouldn't be dlopen'd either.)

Regarding the API endpoint for the plugin's handler, two options are possible:

  • Respond 404 for the endpoint. This is the easier route, but it's not very semantic and makes developing clients dumber.
  • Expose a generic dummy endpoint that can respond in a isPluginEnabled() (or similarly named) API call that returns (bool)false;. This way clients could still produce valid queries to the server (so there isn't a need to check whether a client built for "CodeCompass 4.5.8.9-fooxyz123g" version can communicate with the server of same version) and it is a better semantic information (but could pose security concerns?) to tell users "Yes the server could do but admin guy said no.".

whisperity avatar Jul 19 '18 08:07 whisperity