:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(settings): clarify restricted org switch tooltips (#60395)
Joe Martin71cd644d3d9f
diff --git a/frontend/src/scenes/settings/organization/OrgAI.tsx b/frontend/src/scenes/settings/organization/OrgAI.tsxindex 4a9b2a2bded5..cc84593c7691 100644--- a/frontend/src/scenes/settings/organization/OrgAI.tsx+++ b/frontend/src/scenes/settings/organization/OrgAI.tsx@@ -6,6 +6,8 @@ import { useRestrictedArea } from 'lib/components/RestrictedArea'import { OrganizationMembershipLevel } from 'lib/constants'import { organizationLogic } from 'scenes/organizationLogic'+import { ORG_ADMIN_REQUIRED_TOOLTIP } from './organizationSettingsConstants'+export function OrganizationAI(): JSX.Element {const { currentOrganization, currentOrganizationLoading } = useValues(organizationLogic)const { updateOrganization } = useActions(organizationLogic)@@ -21,7 +23,7 @@ export function OrganizationAI(): JSX.Element {updateOrganization({ is_ai_data_processing_approved: checked })}}checked={!!currentOrganization?.is_ai_data_processing_approved}- disabledReason={restrictionReason || undefined}+ disabledReason={restrictionReason ? ORG_ADMIN_REQUIRED_TOOLTIP : undefined}loading={currentOrganizationLoading}bordered/>diff --git a/frontend/src/scenes/settings/organization/OrgAITraining.tsx b/frontend/src/scenes/settings/organization/OrgAITraining.tsxindex 432d174f0f55..05ed06771071 100644--- a/frontend/src/scenes/settings/organization/OrgAITraining.tsx+++ b/frontend/src/scenes/settings/organization/OrgAITraining.tsx@@ -8,6 +8,7 @@ import { OrganizationMembershipLevel } from 'lib/constants'import { organizationLogic } from 'scenes/organizationLogic'import { AI_TRAINING_URL } from './aiTrainingConstants'+import { ORG_ADMIN_REQUIRED_TOOLTIP } from './organizationSettingsConstants'function AITrainingDescription({ isHipaa, isLocked }: { isHipaa: boolean; isLocked: boolean }): JSX.Element {if (isHipaa) {@@ -50,7 +51,9 @@ export function OrganizationAITrainingOptOut(): JSX.Element {? 'HIPAA organizations are always opted out of AI training. Please contact us if this needs to change.': isLocked? 'Please contact us to change this setting.'- : restrictionReason || undefined+ : restrictionReason+ ? ORG_ADMIN_REQUIRED_TOOLTIP+ : undefinedconst checked = !isHipaa && !!currentOrganization?.is_ai_training_opted_indiff --git a/frontend/src/scenes/settings/organization/OrgIPAnonymizationDefault.tsx b/frontend/src/scenes/settings/organization/OrgIPAnonymizationDefault.tsxindex fd7c67dd86b9..bbde7978b21e 100644--- a/frontend/src/scenes/settings/organization/OrgIPAnonymizationDefault.tsx+++ b/frontend/src/scenes/settings/organization/OrgIPAnonymizationDefault.tsx@@ -7,6 +7,8 @@ import { OrganizationMembershipLevel } from 'lib/constants'import { organizationLogic } from '~/scenes/organizationLogic'+import { ORG_ADMIN_REQUIRED_TOOLTIP } from './organizationSettingsConstants'+export function OrgIPAnonymizationDefault(): JSX.Element {const { currentOrganization, currentOrganizationLoading } = useValues(organizationLogic)const { updateOrganization } = useActions(organizationLogic)@@ -21,7 +23,7 @@ export function OrgIPAnonymizationDefault(): JSX.Element {updateOrganization({ default_anonymize_ips: checked })}}checked={!!currentOrganization?.default_anonymize_ips}- disabledReason={restrictionReason || undefined}+ disabledReason={restrictionReason ? ORG_ADMIN_REQUIRED_TOOLTIP : undefined}loading={currentOrganizationLoading}label="Discard client IP data by default for new projects"bordereddiff --git a/frontend/src/scenes/settings/organization/organizationSettingsConstants.ts b/frontend/src/scenes/settings/organization/organizationSettingsConstants.tsnew file mode 100644index 000000000000..806b9d4d6ab5--- /dev/null+++ b/frontend/src/scenes/settings/organization/organizationSettingsConstants.ts@@ -0,0 +1 @@+export const ORG_ADMIN_REQUIRED_TOOLTIP = 'You must be an admin or owner of your organization to change this setting'