Skip to content

Commit

Permalink
Added deprecation for renaming config option 'xpack.actions.whitelist…
Browse files Browse the repository at this point in the history
…edHosts' to 'xpack.actions.allowedHosts' (#76325)
  • Loading branch information
YulNaumenko authored Aug 31, 2020
1 parent a8b2810 commit 08f9dcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions x-pack/plugins/actions/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { PluginInitializerContext } from '../../../../src/core/server';
import { PluginInitializerContext, PluginConfigDescriptor } from '../../../../src/core/server';
import { ActionsPlugin } from './plugin';
import { configSchema } from './config';
import { ActionsClient as ActionsClientClass } from './actions_client';
import { ActionsAuthorization as ActionsAuthorizationClass } from './authorization/actions_authorization';
import { ActionsConfigType } from './types';

export type ActionsClient = PublicMethodsOf<ActionsClientClass>;
export type ActionsAuthorization = PublicMethodsOf<ActionsAuthorizationClass>;
Expand All @@ -24,6 +25,9 @@ export { PluginSetupContract, PluginStartContract } from './plugin';

export const plugin = (initContext: PluginInitializerContext) => new ActionsPlugin(initContext);

export const config = {
export const config: PluginConfigDescriptor<ActionsConfigType> = {
schema: configSchema,
deprecations: ({ renameFromRoot }) => [
renameFromRoot('xpack.actions.whitelistedHosts', 'xpack.actions.allowedHosts'),
],
};

0 comments on commit 08f9dcc

Please sign in to comment.