mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
chore: add sso settings to enabled features (#38694)
* chore: add sso settings to enabled features * mark as required * Smol tweaks --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This commit is contained in:
1 parent
6cff20b7a2
commit
de3eacda5b
5 files changed
+36
-10
No files matched your search
@@ -3,14 +3,14 @@ import { type PropsWithChildren } from 'react'
|
||||
|
||||
import PartnerIcon from 'components/ui/PartnerIcon'
|
||||
import { PARTNER_TO_NAME } from 'components/ui/PartnerManagedResource'
|
||||
import { useAwsRedirectQuery } from 'data/integrations/aws-redirect-query'
|
||||
import { useVercelRedirectQuery } from 'data/integrations/vercel-redirect-query'
|
||||
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
|
||||
import { withAuth } from 'hooks/misc/withAuth'
|
||||
import { Alert_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui'
|
||||
import { useAwsRedirectQuery } from 'data/integrations/aws-redirect-query'
|
||||
import { MANAGED_BY } from 'lib/constants/infrastructure'
|
||||
import { Alert_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui'
|
||||
|
||||
const OrganizationLayoutContent = ({ children }: PropsWithChildren<{}>) => {
|
||||
const OrganizationLayoutContent = ({ children }: PropsWithChildren) => {
|
||||
const { data: selectedOrganization } = useSelectedOrganizationQuery()
|
||||
|
||||
const vercelQuery = useVercelRedirectQuery(
|
||||
@@ -53,12 +53,12 @@ const OrganizationLayoutContent = ({ children }: PropsWithChildren<{}>) => {
|
||||
</Button>
|
||||
</Alert_Shadcn_>
|
||||
)}
|
||||
<main className="h-full w-full overflow-y-auto">{children}</main>
|
||||
<main className="h-full w-full overflow-y-auto flex flex-col">{children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const OrganizationLayout = ({ children }: PropsWithChildren<{}>) => {
|
||||
const OrganizationLayout = ({ children }: PropsWithChildren) => {
|
||||
return <OrganizationLayoutContent>{children}</OrganizationLayoutContent>
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { PropsWithChildren } from 'react'
|
||||
|
||||
import { useParams } from 'common'
|
||||
import { useCurrentPath } from 'hooks/misc/useCurrentPath'
|
||||
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
||||
import { NavMenu, NavMenuItem } from 'ui'
|
||||
import { ScaffoldContainerLegacy, ScaffoldTitle } from '../Scaffold'
|
||||
|
||||
@@ -12,6 +13,8 @@ function OrganizationSettingsLayout({ children }: PropsWithChildren) {
|
||||
const fullCurrentPath = useCurrentPath()
|
||||
const [currentPath] = fullCurrentPath.split('#')
|
||||
|
||||
const showSsoSettings = useIsFeatureEnabled('organization:show_sso_settings')
|
||||
|
||||
const navMenuItems = [
|
||||
{
|
||||
label: 'General',
|
||||
@@ -26,10 +29,14 @@ function OrganizationSettingsLayout({ children }: PropsWithChildren) {
|
||||
href: `/org/${slug}/apps`,
|
||||
},
|
||||
|
||||
{
|
||||
label: 'SSO',
|
||||
href: `/org/${slug}/sso`,
|
||||
},
|
||||
...(showSsoSettings
|
||||
? [
|
||||
{
|
||||
label: 'SSO',
|
||||
href: `/org/${slug}/sso`,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
{
|
||||
label: 'Audit Logs',
|
||||
@@ -53,7 +60,7 @@ function OrganizationSettingsLayout({ children }: PropsWithChildren) {
|
||||
))}
|
||||
</NavMenu>
|
||||
</ScaffoldContainerLegacy>
|
||||
<main className="h-full w-full overflow-y-auto">{children}</main>
|
||||
<div className="h-full w-full overflow-y-auto">{children}</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
import { useParams } from 'common'
|
||||
import { SSOConfig } from 'components/interfaces/Organization/SSO/SSOConfig'
|
||||
import DefaultLayout from 'components/layouts/DefaultLayout'
|
||||
import OrganizationLayout from 'components/layouts/OrganizationLayout'
|
||||
import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
|
||||
import { UnknownInterface } from 'components/ui/UnknownInterface'
|
||||
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
||||
import type { NextPageWithLayout } from 'types'
|
||||
|
||||
const OrgSSO: NextPageWithLayout = () => {
|
||||
const { slug } = useParams()
|
||||
const showSsoSettings = useIsFeatureEnabled('organization:show_sso_settings')
|
||||
|
||||
if (!showSsoSettings) {
|
||||
return <UnknownInterface urlBack={`/org/${slug}/general`} />
|
||||
}
|
||||
|
||||
return <SSOConfig />
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
"logs:templates": true,
|
||||
"logs:collections": true,
|
||||
|
||||
"organization:show_sso_settings": true,
|
||||
|
||||
"profile:show_email": true,
|
||||
"profile:show_information": true,
|
||||
"profile:show_analytics_and_marketing": true,
|
||||
@@ -58,6 +60,7 @@
|
||||
"project_homepage:show_examples": true,
|
||||
|
||||
"project_addons:dedicated_ipv4_address": true,
|
||||
|
||||
"project_settings:custom_domains": true,
|
||||
"project_settings:show_disable_legacy_api_keys": true,
|
||||
"project_settings:legacy_jwt_keys": true,
|
||||
|
||||
@@ -148,6 +148,11 @@
|
||||
"description": "Enable the logs collections page"
|
||||
},
|
||||
|
||||
"organization:show_sso_settings": {
|
||||
"type": "boolean",
|
||||
"description": "Show the SSO settings tab in the organization settings page"
|
||||
},
|
||||
|
||||
"profile:show_email": {
|
||||
"type": "boolean",
|
||||
"description": "Show the user's email address in the toolbar"
|
||||
@@ -273,6 +278,7 @@
|
||||
"profile:show_account_deletion",
|
||||
"logs:templates",
|
||||
"logs:collections",
|
||||
"organization:show_sso_settings",
|
||||
"project_creation:show_advanced_config",
|
||||
"project_homepage:show_instance_size",
|
||||
"project_homepage:show_examples",
|
||||
|
||||
Reference in new issue
Block a user