mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 15:31:13 -05:00
Fix: Implement MFA enforcement and critical bug fix
This commit is contained in:
@@ -2,6 +2,9 @@ import { ReactNode } from 'react';
|
||||
import { SidebarProvider } from '@/components/ui/sidebar';
|
||||
import { AdminSidebar } from './AdminSidebar';
|
||||
import { AdminTopBar } from './AdminTopBar';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
import { useSessionMonitor } from '@/hooks/useSessionMonitor';
|
||||
|
||||
interface AdminLayoutProps {
|
||||
children: ReactNode;
|
||||
@@ -20,6 +23,8 @@ export function AdminLayout({
|
||||
lastUpdated,
|
||||
isRefreshing
|
||||
}: AdminLayoutProps) {
|
||||
const { aalWarning } = useSessionMonitor();
|
||||
|
||||
return (
|
||||
<SidebarProvider defaultOpen={true}>
|
||||
<div className="flex min-h-screen w-full">
|
||||
@@ -34,6 +39,15 @@ export function AdminLayout({
|
||||
/>
|
||||
<div className="flex-1 overflow-y-auto bg-muted/30">
|
||||
<div className="container mx-auto px-6 py-8 max-w-7xl">
|
||||
{aalWarning && (
|
||||
<Alert variant="destructive" className="mb-6">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
<AlertTitle>Session Verification Required</AlertTitle>
|
||||
<AlertDescription>
|
||||
Your session requires re-verification. You will be redirected to verify your identity in 30 seconds.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user