diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx index da8c2feb2b551..553623380dcc0 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx @@ -20,7 +20,7 @@ import { TutorialDirectoryNoticeComponent, TutorialDirectoryHeaderLinkComponent, } from 'src/plugins/home/public'; -import { sendPutSettings, useGetSettings, useLink } from '../../hooks'; +import { sendPutSettings, useGetSettings, useLink, useCapabilities } from '../../hooks'; const FlexItemButtonWrapper = styled(EuiFlexItem)` &&& { @@ -35,6 +35,7 @@ const tutorialDirectoryNoticeState$ = new BehaviorSubject({ export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(() => { const { getHref } = useLink(); + const { show: hasIngestManager } = useCapabilities(); const { data: settingsData, isLoading } = useGetSettings(); const [dismissedNotice, setDismissedNotice] = useState(false); @@ -55,7 +56,7 @@ export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(() const hasSeenNotice = isLoading || settingsData?.item?.has_seen_add_data_notice || dismissedNotice; - return !hasSeenNotice ? ( + return hasIngestManager && !hasSeenNotice ? ( <> { const { getHref } = useLink(); + const { show: hasIngestManager } = useCapabilities(); const [noticeState, setNoticeState] = useState({ settingsDataLoaded: false, hasSeenNotice: false, @@ -141,7 +143,7 @@ export const TutorialDirectoryHeaderLink: TutorialDirectoryHeaderLinkComponent = }; }, []); - return noticeState.settingsDataLoaded && noticeState.hasSeenNotice ? ( + return hasIngestManager && noticeState.settingsDataLoaded && noticeState.hasSeenNotice ? ( { - const { data: packagesData, isLoading } = useGetPackages(); const { getHref } = useLink(); + const { show: hasIngestManager } = useCapabilities(); + const { data: packagesData, isLoading } = useGetPackages(); const pkgInfo = !isLoading && packagesData?.response && packagesData.response.find((pkg) => pkg.name === moduleName); - if (pkgInfo) { + if (hasIngestManager && pkgInfo) { return ( <>