diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index aa581971e5f09..a92dde76777f5 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -64,6 +64,11 @@ export const allowedExperimentalValues = Object.freeze({ * Enables endpoint package level rbac */ endpointRbacEnabled: false, + + /** + * Enables the Guided Onboarding tour in security + */ + guidedOnboarding: false, }); type ExperimentalConfigKeys = Array; diff --git a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx index 7c6e24ab09e36..43f6ca15b33cb 100644 --- a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx +++ b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx @@ -11,6 +11,7 @@ import React, { createContext, useCallback, useContext, useEffect, useMemo, useS import useObservable from 'react-use/lib/useObservable'; import { catchError, of, timeout } from 'rxjs'; import { useLocation } from 'react-router-dom'; +import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; import { isDetectionsPath } from '../../../helpers'; import { useKibana } from '../../lib/kibana'; import { securityTourConfig, SecurityStepId } from './tour_config'; @@ -111,8 +112,9 @@ export const RealTourContextProvider = ({ children }: { children: ReactChild }) export const TourContextProvider = ({ children }: { children: ReactChild }) => { const { pathname } = useLocation(); + const isTourEnabled = useIsExperimentalFeatureEnabled('guidedOnboarding'); - if (isDetectionsPath(pathname)) { + if (isDetectionsPath(pathname) && isTourEnabled) { return {children}; }