feat(#105): Statut « refusé » – enum, migration, pending/reprise, refuser, connexion
- Enum statut_utilisateur_type + valeur 'refuse' (migration + BDD.sql) - GET /users/reprise, PATCH /users/:id/refuser (refus_compte en validations) - PATCH /users/:id/valider accepte en_attente et refuse (reprise) - Connexion refusée si statut refuse Made-with: Cursor
This commit is contained in:
@@ -96,6 +96,12 @@ export class AuthService {
|
||||
throw new UnauthorizedException('Votre compte a été suspendu. Contactez un administrateur.');
|
||||
}
|
||||
|
||||
if (user.statut === StatutUtilisateurType.REFUSE) {
|
||||
throw new UnauthorizedException(
|
||||
'Votre compte a été refusé. Vous pouvez corriger votre dossier et le soumettre à nouveau ; un gestionnaire pourra le réexaminer.',
|
||||
);
|
||||
}
|
||||
|
||||
return this.generateTokens(user.id, user.email, user.role);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user