Skip to content

Commit 59670a4

Browse files
authored
[Security Solution] Fix entity highlight button showing up on entity flyout when flag is disabled (#241131)
## Summary Fix entity highlight button showing up on entity flyout when flag is disabled 🤦‍♂️
1 parent 99294ad commit 59670a4

File tree

1 file changed

+8
-1
lines changed
  • x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right

1 file changed

+8
-1
lines changed

x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right/content.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import { EuiHorizontalRule } from '@elastic/eui';
99
import React from 'react';
10+
import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features';
1011
import { EntityHighlightsAccordion } from '../../../entity_analytics/components/entity_details_flyout/components/entity_highlights';
1112
import type { UserItem } from '../../../../common/search_strategy';
1213
import { AssetCriticalityAccordion } from '../../../entity_analytics/components/asset_criticality/asset_criticality_selector';
@@ -47,9 +48,15 @@ export const UserPanelContent = ({
4748
}: UserPanelContentProps) => {
4849
const observedFields = useObservedUserItems(observedUser);
4950

51+
const isEntityDetailsHighlightsAIEnabled = useIsExperimentalFeatureEnabled(
52+
'entityDetailsHighlightsEnabled'
53+
);
54+
5055
return (
5156
<FlyoutBody>
52-
<EntityHighlightsAccordion entityIdentifier={userName} entityType={EntityType.user} />
57+
{isEntityDetailsHighlightsAIEnabled && (
58+
<EntityHighlightsAccordion entityIdentifier={userName} entityType={EntityType.user} />
59+
)}
5360
{riskScoreState.hasEngineBeenInstalled && riskScoreState.data?.length !== 0 && (
5461
<>
5562
<FlyoutRiskSummary

0 commit comments

Comments
 (0)