Checkpoint: Ajout du rôle super_formateur avec accès à toutes les formations et séquences. Migration SQL appliquée en local et sur le VPS de production.

This commit is contained in:
Manus
2026-01-29 11:35:35 -05:00
parent 1a8d598339
commit c16392900c
9 changed files with 2331 additions and 14 deletions

View File

@@ -148,6 +148,10 @@ export default function DashboardLayout({
if (user && user.role === 'formateur' && location === '/admin') {
setLocation('/formateur');
}
// Les super formateurs vont sur /admin comme les admins
if (user && user.role === 'super_formateur' && location === '/formateur') {
setLocation('/admin');
}
}, [user, location, setLocation]);
if (loading) {
@@ -224,6 +228,10 @@ function DashboardLayoutContent({
if (user?.role === 'formateur') {
return section.title !== 'Configuration' && section.title !== 'Traçabilité' && section.title !== 'Analyses' && section.title !== 'Gestion technique';
}
// Les super formateurs ne voient pas Gestion technique
if (user?.role === 'super_formateur') {
return section.title !== 'Gestion technique';
}
return true;
}).map(section => {
// Modifier le chemin du tableau de bord pour les formateurs