Added Function to config Profil

This commit is contained in:
2026-02-08 14:21:07 +01:00
parent ff6201a42c
commit f1e9e3f8d4
11 changed files with 557 additions and 10 deletions

View File

@@ -0,0 +1,24 @@
import { redirect } from 'next/navigation';
import { getCurrentUser } from '@/lib/auth';
import { hasPageAccess } from '@/lib/permissions';
import DashboardLayout from '@/components/DashboardLayout';
import ModifierCompteContent from '@/components/ModifierCompteContent';
export default async function ModifierComptePage() {
const user = await getCurrentUser();
if (!user) {
redirect('/login');
}
const hasAccess = await hasPageAccess(user.id, '/dashboard/parametres');
if (!hasAccess) {
redirect('/login');
}
return (
<DashboardLayout user={user}>
<ModifierCompteContent />
</DashboardLayout>
);
}