mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
chore: disable org security tab (#39141)
This commit is contained in:
1 parent
6136b52cb3
commit
941ce7be59
4 files changed
+30
-9
No files matched your search
@@ -13,22 +13,28 @@ function OrganizationSettingsLayout({ children }: PropsWithChildren) {
|
||||
const fullCurrentPath = useCurrentPath()
|
||||
const [currentPath] = fullCurrentPath.split('#')
|
||||
|
||||
const showSsoSettings = useIsFeatureEnabled('organization:show_sso_settings')
|
||||
const {
|
||||
organizationShowSsoSettings: showSsoSettings,
|
||||
organizationShowSecuritySettings: showSecuritySettings,
|
||||
} = useIsFeatureEnabled(['organization:show_sso_settings', 'organization:show_security_settings'])
|
||||
|
||||
const navMenuItems = [
|
||||
{
|
||||
label: 'General',
|
||||
href: `/org/${slug}/general`,
|
||||
},
|
||||
{
|
||||
label: 'Security',
|
||||
href: `/org/${slug}/security`,
|
||||
},
|
||||
...(showSecuritySettings
|
||||
? [
|
||||
{
|
||||
label: 'Security',
|
||||
href: `/org/${slug}/security`,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
label: 'OAuth Apps',
|
||||
href: `/org/${slug}/apps`,
|
||||
},
|
||||
|
||||
...(showSsoSettings
|
||||
? [
|
||||
{
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
import { useParams } from 'common'
|
||||
import { SecuritySettings } from 'components/interfaces/Organization/SecuritySettings/SecuritySettings'
|
||||
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 OrgGeneralSettings: NextPageWithLayout = () => {
|
||||
const OrgSecuritySettings: NextPageWithLayout = () => {
|
||||
const { slug } = useParams()
|
||||
const showSecuritySettings = useIsFeatureEnabled('organization:show_security_settings')
|
||||
|
||||
if (!showSecuritySettings) {
|
||||
return <UnknownInterface urlBack={`/org/${slug}`} />
|
||||
}
|
||||
|
||||
return <SecuritySettings />
|
||||
}
|
||||
|
||||
OrgGeneralSettings.getLayout = (page) => (
|
||||
OrgSecuritySettings.getLayout = (page) => (
|
||||
<DefaultLayout>
|
||||
<OrganizationLayout>
|
||||
<OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
|
||||
</OrganizationLayout>
|
||||
</DefaultLayout>
|
||||
)
|
||||
export default OrgGeneralSettings
|
||||
export default OrgSecuritySettings
|
||||
@@ -65,6 +65,7 @@
|
||||
"logs:collections": true,
|
||||
|
||||
"organization:show_sso_settings": true,
|
||||
"organization:show_security_settings": true,
|
||||
|
||||
"profile:show_email": true,
|
||||
"profile:show_information": true,
|
||||
|
||||
@@ -229,6 +229,10 @@
|
||||
"type": "boolean",
|
||||
"description": "Show the SSO settings tab in the organization settings page"
|
||||
},
|
||||
"organization:show_security_settings": {
|
||||
"type": "boolean",
|
||||
"description": "Show the security settings tab in the organization settings page"
|
||||
},
|
||||
|
||||
"profile:show_email": {
|
||||
"type": "boolean",
|
||||
|
||||
Reference in new issue
Block a user