From 2ce7f03846e3c81f56223d26bd049ab05f912816 Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Mon, 7 Jun 2021 13:51:22 -0400 Subject: [PATCH] Add comments and fix test since removing the unused APIs --- .../security/public/nav_control/nav_control_service.tsx | 4 ++-- x-pack/plugins/security/public/plugin.test.tsx | 2 -- x-pack/plugins/security/public/plugin.tsx | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security/public/nav_control/nav_control_service.tsx b/x-pack/plugins/security/public/nav_control/nav_control_service.tsx index 7f3d93099704a33..4cc654a57aa6a16 100644 --- a/x-pack/plugins/security/public/nav_control/nav_control_service.tsx +++ b/x-pack/plugins/security/public/nav_control/nav_control_service.tsx @@ -31,12 +31,12 @@ interface StartDeps { export interface SecurityNavControlServiceStart { /** - * Returns an Observable of the array of user menu links registered by other plugins + * Returns an Observable of the array of user menu links (the links that show up under the users Avatar in the UI) registered by other plugins */ getUserMenuLinks$: () => Observable; /** - * Registers the provided user menu links to be displayed in the user menu in the global nav + * Registers the provided user menu links to be displayed in the user menu (the links that show up under the users Avatar in the UI). */ addUserMenuLinks: (newUserMenuLink: UserMenuLink[]) => void; } diff --git a/x-pack/plugins/security/public/plugin.test.tsx b/x-pack/plugins/security/public/plugin.test.tsx index d3794ddbeb1a6e5..2878ac954264642 100644 --- a/x-pack/plugins/security/public/plugin.test.tsx +++ b/x-pack/plugins/security/public/plugin.test.tsx @@ -43,7 +43,6 @@ describe('Security Plugin', () => { } ) ).toEqual({ - __legacyCompat: { logoutUrl: '/some-base-path/logout', tenant: '/some-base-path' }, authc: { getCurrentUser: expect.any(Function), areAPIKeysEnabled: expect.any(Function) }, license: { isLicenseAvailable: expect.any(Function), @@ -52,7 +51,6 @@ describe('Security Plugin', () => { getFeatures: expect.any(Function), features$: expect.any(Observable), }, - sessionTimeout: expect.any(SessionTimeout), }); }); diff --git a/x-pack/plugins/security/public/plugin.tsx b/x-pack/plugins/security/public/plugin.tsx index 2a501459160d75e..c66498009c6c31a 100644 --- a/x-pack/plugins/security/public/plugin.tsx +++ b/x-pack/plugins/security/public/plugin.tsx @@ -176,6 +176,9 @@ export interface SecurityPluginSetup { } export interface SecurityPluginStart { + /** + * Exposes the ability to add custom links to the dropdown menu in the top right, where the users Avatar is. + */ navControlService: SecurityNavControlServiceStart; /** * Exposes authentication information about the currently logged in user.