Skip to content

Commit

Permalink
Revert security & spaces changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed Sep 20, 2021
1 parent 06cdaba commit a182670
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
18 changes: 1 addition & 17 deletions x-pack/plugins/security/server/config_deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,12 @@ describe('Config Deprecations', () => {
expect(migrated).toEqual(config);
expect(messages).toMatchInlineSnapshot(`
Array [
"Configuring \\"xpack.security.enabled\\" is deprecated and will be removed in 8.0.0.",
"Disabling the security plugin \\"xpack.security.enabled\\" will only be supported by disable security in Elasticsearch.",
]
`);
});

it('warns when the security plugin is enabled', () => {
it('does not warn when the security plugin is enabled', () => {
const config = {
xpack: {
security: {
Expand All @@ -358,21 +357,6 @@ describe('Config Deprecations', () => {
};
const { messages, migrated } = applyConfigDeprecations(cloneDeep(config));
expect(migrated).toEqual(config);
expect(messages).toMatchInlineSnapshot(`
Array [
"Configuring \\"xpack.security.enabled\\" is deprecated and will be removed in 8.0.0.",
]
`);
});

it('does not warn with default config', () => {
const config = {
xpack: {
security: {},
},
};
const { messages, migrated } = applyConfigDeprecations(cloneDeep(config));
expect(migrated).toEqual(config);
expect(messages).toHaveLength(0);
});
});
2 changes: 0 additions & 2 deletions x-pack/plugins/security/server/config_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { i18n } from '@kbn/i18n';
import type { ConfigDeprecationProvider } from 'src/core/server';

export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
deprecate,
rename,
unused,
}) => [
deprecate('enabled', '8.0.0'),
rename('sessionTimeout', 'session.idleTimeout'),
rename('authProviders', 'authc.providers'),

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/spaces/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const disabledDeprecation: ConfigDeprecation = (config, fromPath, addDeprecation
}
};

export const spacesConfigDeprecationProvider: ConfigDeprecationProvider = ({ deprecate }) => {
return [deprecate('enabled', '8.0.0'), disabledDeprecation];
export const spacesConfigDeprecationProvider: ConfigDeprecationProvider = () => {
return [disabledDeprecation];
};

export type ConfigType = ReturnType<typeof createConfig$> extends Observable<infer P>
Expand Down

0 comments on commit a182670

Please sign in to comment.