mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 20:51:12 -05:00
feat: Implement automatic MFA verification modal
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useAdminGuard } from '@/hooks/useAdminGuard';
|
||||
import { MFARequiredAlert } from '@/components/auth/MFARequiredAlert';
|
||||
import { MFAGuard } from '@/components/auth/MFAGuard';
|
||||
import { AdminLayout } from '@/components/layout/AdminLayout';
|
||||
import { UserManagement } from '@/components/admin/UserManagement';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
@@ -43,27 +43,21 @@ export default function AdminUsers() {
|
||||
if (!isAuthorized) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (needsMFA) {
|
||||
return (
|
||||
<AdminLayout>
|
||||
<MFARequiredAlert />
|
||||
</AdminLayout>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<AdminLayout>
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">User Management</h1>
|
||||
<p className="text-muted-foreground mt-1">
|
||||
Manage user profiles, roles, and permissions
|
||||
</p>
|
||||
</div>
|
||||
<MFAGuard>
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">User Management</h1>
|
||||
<p className="text-muted-foreground mt-1">
|
||||
Manage user profiles, roles, and permissions
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<UserManagement />
|
||||
</div>
|
||||
<UserManagement />
|
||||
</div>
|
||||
</MFAGuard>
|
||||
</AdminLayout>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user