Ban system : Ajout du système de bannissement - #46
Merged
Conversation
…counter. Accounts gain is_banned and ban_reason fields; services, ports and adapters handle ban/unban and block banned users. Frontend adds a site‑wide ban dialog, reason field and counter, updates user list and profile buttons, and cleans old ban code. Full test coverage validates domain, adapters, services and integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Ajout d'un système complet de bannissement/levée de bannissement. Les comptes acquièrent les champs
is_bannedetban_reason. Les services, ports et adaptateurs gèrent le bannissement et bloquent la connexion des utilisateurs bannis. Le frontend ajoute un dialogue de bannissement global avec champ raison et compteur de caractères. Couverture de test complète (domaine, adaptateurs, services, intégration).Backend
is_banned(BOOLEAN) etban_reason(VARCHAR(500)) ajoutées àaccountsis_bannedetban_reasondans l'entitéAccountBanAccountManagementPort, nouvelle méthodeupdate_ban_status()dans le port de sortielogin_service.py: implémenteban_account(),unban_account(),get_banned_accounts()avec validation (existence du compte, pas d'auto-bannissement, pas de bannissement d'un admin)login_service.py—authenticate(): bloque la connexion siis_banned=TrueNonesi l'auteur est banni/admin/banet/admin/unbanavec vérification des droits adminFrontend
base.html.btn-danger,.btn-danger-outline, compteur de caractères avec état visuel de dépassementTests (30 fichiers, ~672 lignes)