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:
@@ -12,7 +12,7 @@ export default function Home() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!loading && isAuthenticated) {
|
||||
if (user?.role === 'admin') {
|
||||
if (user?.role === 'admin' || user?.role === 'super_formateur') {
|
||||
setLocation('/admin');
|
||||
} else if (user?.role === 'formateur') {
|
||||
setLocation('/formateur');
|
||||
@@ -28,7 +28,7 @@ export default function Home() {
|
||||
);
|
||||
}
|
||||
|
||||
if (isAuthenticated && (user?.role === 'admin' || user?.role === 'formateur')) {
|
||||
if (isAuthenticated && (user?.role === 'admin' || user?.role === 'formateur' || user?.role === 'super_formateur')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user