mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
15 lines
341 B
JavaScript
15 lines
341 B
JavaScript
import toPath from 'lodash/internal/toPath';
|
|
|
|
export default async function (kbnServer, server, config) {
|
|
const { plugins } = kbnServer;
|
|
|
|
for (let plugin of plugins) {
|
|
const enabledInConfig = config.get([...toPath(plugin.configPrefix), 'enabled']);
|
|
|
|
if (!enabledInConfig) {
|
|
plugins.disable(plugin);
|
|
}
|
|
}
|
|
|
|
return;
|
|
};
|