Repository: supabase/supabase
File: apps/studio/components/layouts/AuthLayout/AuthLayout.utils.ts (TypeScript)

Code before:
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
import { IS_PLATFORM } from 'lib/constants'

export const generateAuthMenu = (
  ref: string,
  flags?: {
    authenticationSignInProviders: boolean
    authenticationRateLimits: boolean
    authenticationEmails: boolean
    authenticationMultiFactor: boolean
    authenticationAttackProtection: boolean
    authenticationAdvanced: boolean
    authenticationShowOverview: boolean
    authenticationShowSecurityNotifications: boolean
  }
): ProductMenuGroup[] => {
  const {
    authenticationSignInProviders,
    authenticationRateLimits,
    authenticationEmails,
    authenticationMultiFactor,
    authenticationAttackProtection,
    authenticationAdvanced,
    authenticationShowOverview,
    authenticationShowSecurityNotifications,
  } = flags ?? {}

  return [
    {
      title: 'Manage',
      items: [
        ...(authenticationShowOverview
          ? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }]
          : []),
        { name: 'Users', key: 'users', url: `/project/${ref}/auth/users`, items: [] },
      ],
    },
    ...(authenticationShowSecurityNotifications
      ? [
          {
            title: 'Notifications',
            items: [
              ...(authenticationEmails
                ? [
                    {
                      name: 'Emails',
                      key: 'emails',
                      pages: ['templates', 'smtp'],
                      url: `/project/${ref}/auth/templates`,
                      items: [],

Review comment (security):
Following the same naming convention and declaration as set out by the other feature flags and previews: `authenticationFeatureDoesThis`.

Code after:
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
import { IS_PLATFORM } from 'lib/constants'

export const generateAuthMenu = (
  ref: string,
  flags?: {
    authenticationSignInProviders: boolean
    authenticationRateLimits: boolean
    authenticationEmails: boolean
    authenticationMultiFactor: boolean
    authenticationAttackProtection: boolean
    authenticationAdvanced: boolean
    authenticationShowOverview: boolean
    authenticationShowSecurityNotifications: boolean
  }
): ProductMenuGroup[] => {
  const {
    authenticationSignInProviders,
    authenticationRateLimits,
    authenticationEmails,
    authenticationMultiFactor,
    authenticationAttackProtection,
    authenticationAdvanced,
    authenticationShowOverview,
    authenticationShowSecurityNotifications,
  } = flags ?? {}

  return [
    {
      title: 'Manage',
      items: [
        ...(authenticationShowOverview
          ? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }]
          : []),
        { name: 'Users', key: 'users', url: `/project/${ref}/auth/users`, items: [] },
      ],
    },
    ...(authenticationEmails && authenticationShowSecurityNotifications && IS_PLATFORM
      ? [
          {
            title: 'Notifications',
            items: [
              ...(authenticationEmails
                ? [
                    {
                      name: 'Email',
                      key: 'email',
                      pages: ['templates', 'smtp'],
                      url: `/project/${ref}/auth/templates`,
                      items: [],