diff --git a/apps/sim/lib/mothership/tools/server/settings.ts b/apps/sim/lib/mothership/tools/server/settings.ts index 6ec644d6ebe..137b4ea133e 100644 --- a/apps/sim/lib/mothership/tools/server/settings.ts +++ b/apps/sim/lib/mothership/tools/server/settings.ts @@ -64,6 +64,7 @@ import { } from '@/lib/organizations/application/settings' import { authorizeOrganizationSettingsSection } from '@/lib/settings/application/organization-section-access' import { type SettingsSection, settingsSections } from '@/lib/settings/sections' +import { isSimLinksEnabled } from '@/lib/sim-links/feature-flag' import { delegatedAccountPreferencesSchema, updateCurrentUserPreferences, @@ -314,6 +315,12 @@ const adapters: Record = { } async function describeSection(context: SettingsContext, section: SettingsSection) { + if ( + context.scope === 'organization' && + section.id === 'sim-links' && + !(await isSimLinksEnabled(organizationInput(context).organizationId)) + ) + return null const adapter = adapters[`${context.scope}/${section.id}`] const uiSection = context.scope === 'organization' &&