From a5735d7291ea40c4172b873e15510b1633a9eaec Mon Sep 17 00:00:00 2001 From: PhilippeOberti Date: Tue, 1 Oct 2024 11:29:15 -0500 Subject: [PATCH] prevent users from accessing the url if the feature flag is not turned on --- .../security_solution/public/management/pages/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/index.tsx b/x-pack/plugins/security_solution/public/management/pages/index.tsx index f9285fd10f472..dc8314acc276c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/index.tsx @@ -11,6 +11,7 @@ import { Routes, Route } from '@kbn/shared-ux-router'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { EuiEmptyPrompt, EuiLoadingLogo } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; import { NotesContainer } from './notes'; import { ManagementEmptyStateWrapper } from '../components/management_empty_state_wrapper'; import { @@ -87,6 +88,10 @@ const NotesTelemetry = () => ( ); export const ManagementContainer = memo(() => { + const securitySolutionNotesEnabled = useIsExperimentalFeatureEnabled( + 'securitySolutionNotesEnabled' + ); + const { loading, canReadPolicyManagement, @@ -157,7 +162,9 @@ export const ManagementContainer = memo(() => { hasPrivilege={canReadActionsLogManagement} /> - + {securitySolutionNotesEnabled && ( + + )} {canReadEndpointList && (