From e9e34e9f77cf51100619a0fb5de71769026762dc Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 12 Jan 2024 10:16:15 +0100 Subject: [PATCH] fix(ui): capture rate - ee --- .../shared/SessionSettings/components/CaptureRate.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx b/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx index 5494024bf..2bc65ff94 100644 --- a/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx +++ b/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx @@ -10,6 +10,7 @@ import ConditionalRecordingSettings from 'Shared/SessionSettings/components/Cond type Props = { isAdmin: boolean; + isEnterprise?: boolean; projectId?: number; setShowCaptureRate: (show: boolean) => void; open: boolean; @@ -18,7 +19,7 @@ type Props = { function CaptureRate(props: Props) { const [conditions, setConditions] = React.useState([]); - const { isAdmin, projectId } = props; + const { isAdmin, projectId, isEnterprise } = props; const { settingsStore } = useStore(); const [changed, setChanged] = useState(false); const { @@ -67,7 +68,6 @@ function CaptureRate(props: Props) { }; const updateDisabled = !changed || !isAdmin || (captureAll && conditions.length === 0); - return ( ) : null} - {captureAll ? ( + {captureAll && isEnterprise ? ( ({ isAdmin: state.getIn(['user', 'account', 'admin']) || state.getIn(['user', 'account', 'superAdmin']), + isEnterprise: + state.getIn(['user', 'account', 'edition']) === 'ee' || + state.getIn(['user', 'authDetails', 'edition']) === 'ee' }))(observer(CaptureRate));