@@ -39,7 +39,7 @@ import { initSavedObjects, savedObjectTypes } from './saved_objects';
3939import { AppClientFactory } from './client' ;
4040import { createConfig$ , ConfigType } from './config' ;
4141import { initUiSettings } from './ui_settings' ;
42- import { APP_ID , APP_ICON , SERVER_APP_ID } from '../common/constants' ;
42+ import { APP_ID , APP_ICON , SERVER_APP_ID , SecurityPageName } from '../common/constants' ;
4343import { registerEndpointRoutes } from './endpoint/routes/metadata' ;
4444import { registerResolverRoutes } from './endpoint/routes/resolver' ;
4545import { registerPolicyRoutes } from './endpoint/routes/policy' ;
@@ -70,6 +70,17 @@ export interface PluginSetup {}
7070// eslint-disable-next-line @typescript-eslint/no-empty-interface
7171export interface PluginStart { }
7272
73+ const securitySubPlugins = [
74+ APP_ID ,
75+ `${ APP_ID } :${ SecurityPageName . overview } ` ,
76+ `${ APP_ID } :${ SecurityPageName . alerts } ` ,
77+ `${ APP_ID } :${ SecurityPageName . hosts } ` ,
78+ `${ APP_ID } :${ SecurityPageName . network } ` ,
79+ `${ APP_ID } :${ SecurityPageName . timelines } ` ,
80+ `${ APP_ID } :${ SecurityPageName . case } ` ,
81+ `${ APP_ID } :${ SecurityPageName . management } ` ,
82+ ] ;
83+
7384export class Plugin implements IPlugin < PluginSetup , PluginStart , SetupPlugins , StartPlugins > {
7485 private readonly logger : Logger ;
7586 private readonly config$ : Observable < ConfigType > ;
@@ -144,12 +155,12 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
144155 } ) ,
145156 order : 1100 ,
146157 icon : APP_ICON ,
147- navLinkId : 'securitySolution' ,
148- app : [ 'securitySolution' , 'kibana' ] ,
158+ navLinkId : APP_ID ,
159+ app : [ ... securitySubPlugins , 'kibana' ] ,
149160 catalogue : [ 'securitySolution' ] ,
150161 privileges : {
151162 all : {
152- app : [ 'securitySolution' , 'kibana' ] ,
163+ app : [ ... securitySubPlugins , 'kibana' ] ,
153164 catalogue : [ 'securitySolution' ] ,
154165 api : [ 'securitySolution' , 'actions-read' , 'actions-all' , 'alerting-read' , 'alerting-all' ] ,
155166 savedObject : {
@@ -177,7 +188,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
177188 ] ,
178189 } ,
179190 read : {
180- app : [ 'securitySolution' , 'kibana' ] ,
191+ app : [ ... securitySubPlugins , 'kibana' ] ,
181192 catalogue : [ 'securitySolution' ] ,
182193 api : [ 'securitySolution' , 'actions-read' , 'actions-all' , 'alerting-read' , 'alerting-all' ] ,
183194 savedObject : {
0 commit comments