diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 122f62be237a1..03047c582f7b6 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -166,6 +166,7 @@ export const FEATURE_FLAGS = { // owner: #team-monitoring SESSION_RECORDING_ALLOW_V1_SNAPSHOTS: 'session-recording-allow-v1-snapshots', HOGQL_INSIGHTS: 'hogql-insights', // owner: @mariusandra + WEBHOOKS_DENYLIST: 'webhooks-denylist', // owner: #team-pipeline } as const export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS] diff --git a/frontend/src/scenes/project/Settings/WebhookIntegration.tsx b/frontend/src/scenes/project/Settings/WebhookIntegration.tsx index 83ba8c9a13114..23caab8f00533 100644 --- a/frontend/src/scenes/project/Settings/WebhookIntegration.tsx +++ b/frontend/src/scenes/project/Settings/WebhookIntegration.tsx @@ -2,13 +2,18 @@ import { useEffect, useState } from 'react' import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' import { webhookIntegrationLogic } from './webhookIntegrationLogic' -import { LemonButton, LemonInput } from '@posthog/lemon-ui' +import { LemonButton, LemonInput, Link } from '@posthog/lemon-ui' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' +import { FEATURE_FLAGS } from 'lib/constants' +import { supportLogic } from 'lib/components/Support/supportLogic' export function WebhookIntegration(): JSX.Element { const [webhook, setWebhook] = useState('') const { testWebhook, removeWebhook } = useActions(webhookIntegrationLogic) const { loading } = useValues(webhookIntegrationLogic) const { currentTeam } = useValues(teamLogic) + const { featureFlags } = useValues(featureFlagLogic) + const { openSupportForm } = useActions(supportLogic) useEffect(() => { if (currentTeam?.slack_incoming_webhook) { @@ -16,6 +21,18 @@ export function WebhookIntegration(): JSX.Element { } }, [currentTeam]) + const webhooks_blacklisted = featureFlags[FEATURE_FLAGS.WEBHOOKS_DENYLIST] + if (webhooks_blacklisted) { + return ( +
+ Webhooks are currently not available for your organization.{' '} + openSupportForm('support', 'apps')}>Contact support +
+