diff --git a/apps/studio/components/layouts/AuthLayout/AuthLayout.tsx b/apps/studio/components/layouts/AuthLayout/AuthLayout.tsx index a57815f65d4..1ec5d1f12a4 100644 --- a/apps/studio/components/layouts/AuthLayout/AuthLayout.tsx +++ b/apps/studio/components/layouts/AuthLayout/AuthLayout.tsx @@ -8,11 +8,15 @@ import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { withAuth } from 'hooks/misc/withAuth' import ProjectLayout from '../ProjectLayout/ProjectLayout' import { generateAuthMenu } from './AuthLayout.utils' +import { useFlag } from 'common' const AuthProductMenu = () => { const router = useRouter() const { ref: projectRef = 'default' } = useParams() + const isAuthOverviewPage = useFlag('authOverviewPage') + console.log('isAuthOverviewPage', isAuthOverviewPage) + const { authenticationSignInProviders, authenticationRateLimits, @@ -42,6 +46,7 @@ const AuthProductMenu = () => { authenticationMultiFactor, authenticationAttackProtection, authenticationAdvanced, + authenticationShowOverview: isAuthOverviewPage, })} /> ) diff --git a/apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts b/apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts index e6bdc342ec0..67bad8717a3 100644 --- a/apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts +++ b/apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts @@ -10,7 +10,7 @@ export const generateAuthMenu = ( authenticationMultiFactor: boolean authenticationAttackProtection: boolean authenticationAdvanced: boolean - // authenticationOverview: boolean + authenticationShowOverview: boolean } ): ProductMenuGroup[] => { const { @@ -20,17 +20,16 @@ export const generateAuthMenu = ( authenticationMultiFactor, authenticationAttackProtection, authenticationAdvanced, - // authenticationOverview, + authenticationShowOverview, } = flags ?? {} return [ { title: 'Manage', items: [ - // ...(authenticationOverview - // ? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }] - // : []), - { name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }, + ...(authenticationShowOverview + ? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }] + : []), { name: 'Users', key: 'users', url: `/project/${ref}/auth/users`, items: [] }, ], },