security.tsx50 lines · main
| 1 | import { useParams } from 'common' |
| 2 | import { |
| 3 | PageHeader, |
| 4 | PageHeaderDescription, |
| 5 | PageHeaderMeta, |
| 6 | PageHeaderSummary, |
| 7 | PageHeaderTitle, |
| 8 | } from 'ui-patterns/PageHeader' |
| 9 | |
| 10 | import { SecuritySettings } from '@/components/interfaces/Organization/SecuritySettings' |
| 11 | import DefaultLayout from '@/components/layouts/DefaultLayout' |
| 12 | import OrganizationLayout from '@/components/layouts/OrganizationLayout' |
| 13 | import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout' |
| 14 | import { UnknownInterface } from '@/components/ui/UnknownInterface' |
| 15 | import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' |
| 16 | import type { NextPageWithLayout } from '@/types' |
| 17 | |
| 18 | const OrgSecuritySettings: NextPageWithLayout = () => { |
| 19 | const { slug } = useParams() |
| 20 | const showSecuritySettings = useIsFeatureEnabled('organization:show_security_settings') |
| 21 | |
| 22 | if (!showSecuritySettings) { |
| 23 | return <UnknownInterface urlBack={`/org/${slug}`} /> |
| 24 | } |
| 25 | |
| 26 | return ( |
| 27 | <> |
| 28 | <PageHeader size="small"> |
| 29 | <PageHeaderMeta> |
| 30 | <PageHeaderSummary> |
| 31 | <PageHeaderTitle>Security</PageHeaderTitle> |
| 32 | <PageHeaderDescription> |
| 33 | Organization-wide security controls and MFA enforcement |
| 34 | </PageHeaderDescription> |
| 35 | </PageHeaderSummary> |
| 36 | </PageHeaderMeta> |
| 37 | </PageHeader> |
| 38 | <SecuritySettings /> |
| 39 | </> |
| 40 | ) |
| 41 | } |
| 42 | |
| 43 | OrgSecuritySettings.getLayout = (page) => ( |
| 44 | <DefaultLayout> |
| 45 | <OrganizationLayout title="Security"> |
| 46 | <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout> |
| 47 | </OrganizationLayout> |
| 48 | </DefaultLayout> |
| 49 | ) |
| 50 | export default OrgSecuritySettings |