diff --git a/src/controllers/admin/plugins.js b/src/controllers/admin/plugins.js index a0b7457f01..62743e00a3 100644 --- a/src/controllers/admin/plugins.js +++ b/src/controllers/admin/plugins.js @@ -15,8 +15,8 @@ pluginsController.get = async function (req, res) { ]); const compatiblePkgNames = compatible.map(pkgData => pkgData.name); - const installedPlugins = compatible.filter(plugin => plugin && plugin.installed); - const activePlugins = all.filter(plugin => plugin && plugin.installed && plugin.active); + const installedPlugins = compatible.filter(plugin => plugin && (plugin.installed || (nconf.get('plugins:active') && plugin.active))); + const activePlugins = all.filter(plugin => plugin && (plugin.installed || nconf.get('plugins:active')) && plugin.active); const trendingScores = trending.reduce((memo, cur) => { memo[cur.label] = cur.value; diff --git a/src/plugins/index.js b/src/plugins/index.js index 3587dc091c..f573202450 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -234,6 +234,13 @@ Plugins.normalise = async function (apiReturn) { pluginMap[plugin.id].outdated = semver.gt(pluginMap[plugin.id].latest, pluginMap[plugin.id].version); }); + if (nconf.get('plugins:active')) { + nconf.get('plugins:active').forEach((id) => { + pluginMap[id] = pluginMap[id] || {}; + pluginMap[id].active = true; + }); + } + const pluginArray = Object.values(pluginMap); pluginArray.sort((a, b) => {