import { redirect } from 'next/navigation'; import { getCurrentUser } from '@/lib/auth'; import { hasPageAccess } from '@/lib/permissions'; import DashboardLayout from '@/components/DashboardLayout'; import CalendrierPageContent from '@/components/CalendrierPageContent'; export default async function CalendrierPage() { const user = await getCurrentUser(); if (!user) { redirect('/login'); } const hasAccess = await hasPageAccess(user.id, '/dashboard/calendrier'); if (!hasAccess) { redirect('/dashboard/parametres'); } return (
); }