diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx index 9f1d716f6f396..4261d32b6b4b5 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx @@ -23,7 +23,7 @@ import { EuiSwitch, } from '@elastic/eui'; -import { usePutSettingsMutation, useStartServices } from '../../../hooks'; +import { usePutSettingsMutation, useStartServices, useAuthz } from '../../../hooks'; export type IntegrationPreferenceType = 'recommended' | 'beats' | 'agent'; @@ -92,7 +92,7 @@ export const IntegrationPreference = ({ const [prereleaseIntegrationsChecked, setPrereleaseIntegrationsChecked] = React.useState< boolean | undefined >(undefined); - + const authz = useAuthz(); const { docLinks, notifications } = useStartServices(); const { mutateAsync: mutateSettingsAsync } = usePutSettingsMutation(); @@ -153,18 +153,24 @@ export const IntegrationPreference = ({ updateSettings(event.target.checked); }; + const canUpdateBetaSetting = authz.fleet.allSettings; + return ( - - + {canUpdateBetaSetting && ( + <> + + + + )} {title}