kibana/x-pack/plugins/security_solution_ess/server/plugin.ts
Sergi Massaneda 872929bd60
[Security Solution] Refactor AppFeatures to ProductFeatures (#177005)
## Summary

This PR renames `AppFeatures` -> `ProductFeatures`.

This module is responsible for managing the Security _features_ that are
enabled according to the _product_ type used. After talking with
different teams we agreed it would be more intuitive and easier to
understand if we named it `ProductFeatures`, since `AppFeatures` is too
vague and generic.

This refactoring does not introduce any change in the application
behavior.

Internal docs will also be updated.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-19 04:55:05 -07:00

40 lines
1.2 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { Plugin, CoreSetup } from '@kbn/core/server';
import { getProductProductFeaturesConfigurator } from './product_features';
import { DEFAULT_PRODUCT_FEATURES } from './constants';
import type {
SecuritySolutionEssPluginSetup,
SecuritySolutionEssPluginStart,
SecuritySolutionEssPluginSetupDeps,
SecuritySolutionEssPluginStartDeps,
} from './types';
export class SecuritySolutionEssPlugin
implements
Plugin<
SecuritySolutionEssPluginSetup,
SecuritySolutionEssPluginStart,
SecuritySolutionEssPluginSetupDeps,
SecuritySolutionEssPluginStartDeps
>
{
public setup(_coreSetup: CoreSetup, pluginsSetup: SecuritySolutionEssPluginSetupDeps) {
const productFeaturesConfigurator =
getProductProductFeaturesConfigurator(DEFAULT_PRODUCT_FEATURES);
pluginsSetup.securitySolution.setProductFeaturesConfigurator(productFeaturesConfigurator);
return {};
}
public start() {
return {};
}
public stop() {}
}