The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: disable account security page (#39319)
Alaister Young0ea541938c0d
diff --git a/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx b/apps/studio/components/layouts/AccountLayout/AccountLayout.tsxindex 679f916b09f..33b83ecf4fa 100644--- a/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx+++ b/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx@@ -4,6 +4,7 @@ import { PropsWithChildren, useEffect } from 'react'import { LOCAL_STORAGE_KEYS } from 'common'import { useCustomContent } from 'hooks/custom-content/useCustomContent'+import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'import { withAuth } from 'hooks/misc/withAuth'import { IS_PLATFORM } from 'lib/constants'@@ -19,6 +20,8 @@ const AccountLayout = ({ children, title }: PropsWithChildren<AccountLayoutPropsconst router = useRouter()const appSnap = useAppStateSnapshot()+ const showSecuritySettings = useIsFeatureEnabled('account:show_security_settings')+const { appTitle } = useCustomContent(['app:title'])const titleSuffix = appTitle || 'Supabase'@@ -70,12 +73,16 @@ const AccountLayout = ({ children, title }: PropsWithChildren<AccountLayoutPropshref: '/account/tokens',isActive: currentPath === '/account/tokens',},- {- key: 'security',- label: 'Security',- href: '/account/security',- isActive: currentPath === '/account/security',- },+ ...(showSecuritySettings+ ? [+ {+ key: 'security',+ label: 'Security',+ href: '/account/security',+ isActive: currentPath === '/account/security',+ },+ ]+ : []),],},{diff --git a/apps/studio/pages/account/security.tsx b/apps/studio/pages/account/security.tsxindex 8fe0a22e1de..40309cf089e 100644--- a/apps/studio/pages/account/security.tsx+++ b/apps/studio/pages/account/security.tsx@@ -5,7 +5,14 @@ import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'import AppLayout from 'components/layouts/AppLayout/AppLayout'import DefaultLayout from 'components/layouts/DefaultLayout'import OrganizationLayout from 'components/layouts/OrganizationLayout'+import {+ ScaffoldContainer,+ ScaffoldHeader,+ ScaffoldSectionTitle,+} from 'components/layouts/Scaffold'+import { UnknownInterface } from 'components/ui/UnknownInterface'import { useMfaListFactorsQuery } from 'data/profile/mfa-list-factors-query'+import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'import type { NextPageWithLayout } from 'types'import {Badge,@@ -14,11 +21,6 @@ import {CollapsibleContent_Shadcn_,CollapsibleTrigger_Shadcn_,} from 'ui'-import {- ScaffoldContainer,- ScaffoldHeader,- ScaffoldSectionTitle,-} from 'components/layouts/Scaffold'const collapsibleClasses = ['bg-surface-100',@@ -34,7 +36,13 @@ const collapsibleClasses = []const Security: NextPageWithLayout = () => {- const { data } = useMfaListFactorsQuery()+ const showSecuritySettings = useIsFeatureEnabled('account:show_security_settings')++ const { data } = useMfaListFactorsQuery({ enabled: showSecuritySettings })++ if (!showSecuritySettings) {+ return <UnknownInterface urlBack={`/account/me`} />+ }return (<>diff --git a/packages/common/enabled-features/enabled-features.json b/packages/common/enabled-features/enabled-features.jsonindex e6a8f46bbc0..d47444f59f4 100644--- a/packages/common/enabled-features/enabled-features.json+++ b/packages/common/enabled-features/enabled-features.json@@ -1,6 +1,8 @@{"$schema": "./enabled-features.schema.json",+ "account:show_security_settings": true,+"ai:opt_in_level_disabled": true,"ai:opt_in_level_schema": true,"ai:opt_in_level_schema_and_log": true,diff --git a/packages/common/enabled-features/enabled-features.schema.json b/packages/common/enabled-features/enabled-features.schema.jsonindex 54ba0767619..96cd9ef0d8e 100644--- a/packages/common/enabled-features/enabled-features.schema.json+++ b/packages/common/enabled-features/enabled-features.schema.json@@ -6,6 +6,11 @@"type": "string"},+ "account:show_security_settings": {+ "type": "boolean",+ "description": "Show the account security settings page"+ },+"ai:opt_in_level_disabled": {"type": "boolean","description": "Enable the AI opt in level 'disabled'"@@ -395,6 +400,7 @@}},"required": [+ "account:show_security_settings","ai:opt_in_level_disabled","ai:opt_in_level_schema","ai:opt_in_level_schema_and_log",