mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 06:36:37 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
170 lines
4.9 KiB
TypeScript
170 lines
4.9 KiB
TypeScript
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
|
|
authenticationShowOverview: boolean
|
|
authenticationOauth21: boolean
|
|
authenticationPerformance: boolean
|
|
}
|
|
): ProductMenuGroup[] => {
|
|
const {
|
|
authenticationSignInProviders,
|
|
authenticationRateLimits,
|
|
authenticationEmails,
|
|
authenticationMultiFactor,
|
|
authenticationAttackProtection,
|
|
authenticationShowOverview,
|
|
authenticationOauth21,
|
|
authenticationPerformance,
|
|
} = 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: [] },
|
|
...(authenticationOauth21
|
|
? [
|
|
{
|
|
name: 'OAuth Apps',
|
|
key: 'oauth-apps',
|
|
url: `/project/${ref}/auth/oauth-apps`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
],
|
|
},
|
|
...(authenticationEmails && IS_PLATFORM
|
|
? [
|
|
{
|
|
title: 'Notifications',
|
|
items: [
|
|
...(authenticationEmails
|
|
? [
|
|
{
|
|
name: 'Email',
|
|
key: 'email',
|
|
pages: ['templates', 'smtp'],
|
|
url: `/project/${ref}/auth/templates`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
],
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
title: 'Configuration',
|
|
items: [
|
|
{
|
|
name: 'Policies',
|
|
key: 'policies',
|
|
url: `/project/${ref}/auth/policies`,
|
|
items: [],
|
|
},
|
|
...(IS_PLATFORM
|
|
? [
|
|
...(authenticationSignInProviders
|
|
? [
|
|
{
|
|
name: 'Sign In / Providers',
|
|
key: 'sign-in-up',
|
|
pages: ['providers', 'third-party'],
|
|
url: `/project/${ref}/auth/providers`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
...(authenticationOauth21
|
|
? [
|
|
{
|
|
name: 'OAuth Server',
|
|
key: 'oauth-server',
|
|
url: `/project/${ref}/auth/oauth-server`,
|
|
label: 'Beta',
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
name: 'Sessions',
|
|
key: 'sessions',
|
|
url: `/project/${ref}/auth/sessions`,
|
|
items: [],
|
|
},
|
|
...(authenticationRateLimits
|
|
? [
|
|
{
|
|
name: 'Rate Limits',
|
|
key: 'rate-limits',
|
|
url: `/project/${ref}/auth/rate-limits`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
...(authenticationMultiFactor
|
|
? [
|
|
{
|
|
name: 'Multi-Factor',
|
|
key: 'mfa',
|
|
url: `/project/${ref}/auth/mfa`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
name: 'URL Configuration',
|
|
key: 'url-configuration',
|
|
url: `/project/${ref}/auth/url-configuration`,
|
|
items: [],
|
|
},
|
|
...(authenticationAttackProtection
|
|
? [
|
|
{
|
|
name: 'Attack Protection',
|
|
key: 'protection',
|
|
url: `/project/${ref}/auth/protection`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
name: 'Auth Hooks',
|
|
key: 'hooks',
|
|
url: `/project/${ref}/auth/hooks`,
|
|
items: [],
|
|
label: 'Beta',
|
|
},
|
|
{
|
|
name: 'Audit Logs',
|
|
key: 'audit-logs',
|
|
url: `/project/${ref}/auth/audit-logs`,
|
|
items: [],
|
|
},
|
|
...(authenticationPerformance
|
|
? [
|
|
{
|
|
name: 'Performance',
|
|
key: 'performance',
|
|
url: `/project/${ref}/auth/performance`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
]
|
|
: []),
|
|
],
|
|
},
|
|
]
|
|
}
|