Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
eokoneyo committed Oct 11, 2024
1 parent d65a0c6 commit 9471152
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* 2.0.
*/

import type { SecurityPluginStart } from '../plugin';
import type { SecurityPluginSetup } from '../plugin';

export type SecurityLicense = SecurityPluginStart['license'];
export type SecurityLicense = SecurityPluginSetup['license'];
4 changes: 0 additions & 4 deletions x-pack/packages/security/plugin_types_public/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,4 @@ export interface SecurityPluginStart {
* @deprecated in favor of Core's `userProfile` service.
*/
userProfiles: UserProfileAPIClient;
/**
* Exposes information about the available security features under the current license.
*/
license: SecurityLicense;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import type {
PrivilegesAPIClientPublicContract,
RolesAPIClient,
SecurityPluginStart,
SecurityLicense,
} from '@kbn/security-plugin-types-public';
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { Route, Router, Routes } from '@kbn/shared-ux-router';
Expand All @@ -38,7 +38,7 @@ export interface CreateParams {
eventTracker: EventTracker;
getPrivilegesAPIClient: () => Promise<PrivilegesAPIClientPublicContract>;
isServerless: boolean;
getSecurityLicense: () => Promise<SecurityPluginStart['license']>;
getSecurityLicense: () => Promise<SecurityLicense>;
}

export const spacesManagementApp = Object.freeze({
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/spaces/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kb
import type { FeaturesPluginStart } from '@kbn/features-plugin/public';
import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
import type { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public';
import type { SecurityPluginStart } from '@kbn/security-plugin-types-public';
import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin-types-public';

import { EventTracker, registerAnalyticsContext, registerSpacesEventTypes } from './analytics';
import type { ConfigType } from './config';
Expand Down Expand Up @@ -115,7 +115,7 @@ export class SpacesPlugin implements Plugin<SpacesPluginSetup, SpacesPluginStart
};

const getSecurityLicense = async () => {
const { security } = await core.plugins.onSetup<{ security: SecurityPluginStart }>(
const { security } = await core.plugins.onSetup<{ security: SecurityPluginSetup }>(
'security'
);

Expand Down

0 comments on commit 9471152

Please sign in to comment.