feat: WebSocket temps réel + Finance Workflow + corrections
- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics) * Backend: KafkaEventProducer, KafkaEventConsumer * Mobile: WebSocketService (reconnection, heartbeat, typed events) * DashboardBloc: Auto-refresh depuis WebSocket events - Finance Workflow: approbations + budgets (backend + mobile) * Backend: entities, services, resources, migrations Flyway V6 * Mobile: features finance_workflow complète avec BLoC - Corrections DI: interfaces IRepository partout * IProfileRepository, IOrganizationRepository, IMembreRepository * GetIt configuré avec @injectable - Spec-Kit: constitution + templates mis à jour * .specify/memory/constitution.md enrichie * Templates agent, plan, spec, tasks, checklist - Nettoyage: fichiers temporaires supprimés Signed-off-by: lions dev Team
This commit is contained in:
301
unionflow/docs/PERMISSIONS_MATRIX.md
Normal file
301
unionflow/docs/PERMISSIONS_MATRIX.md
Normal file
@@ -0,0 +1,301 @@
|
||||
# Matrice de Permissions UnionFlow - Pages Web
|
||||
|
||||
> Dernière mise à jour : 2026-03-02
|
||||
> Cette matrice définit les rôles autorisés pour chaque page de l'application UnionFlow.
|
||||
|
||||
## Légende des Rôles
|
||||
|
||||
| Rôle | Code | Description |
|
||||
|------|------|-------------|
|
||||
| Super Admin | `SUPER_ADMIN` | Accès total système |
|
||||
| Admin Organisation | `ADMIN` | Administrateur d'une organisation |
|
||||
| Trésorier | `TRESORIER` | Gestion financière |
|
||||
| Secrétaire | `SECRETAIRE` | Gestion administrative |
|
||||
| Responsable Social | `RESPONSABLE_SOCIAL` | Gestion des aides sociales |
|
||||
| Responsable Événements | `RESPONSABLE_EVENEMENTS` | Gestion des événements |
|
||||
| Responsable Crédit | `RESPONSABLE_CREDIT` | Gestion épargne/crédit |
|
||||
| Membre Bureau | `MEMBRE_BUREAU` | Membre du bureau exécutif |
|
||||
| Membre Actif | `MEMBRE_ACTIF` | Membre actif avec cotisations à jour |
|
||||
| Membre Simple | `MEMBRE_SIMPLE` | Membre avec accès limité |
|
||||
|
||||
---
|
||||
|
||||
## 1. Pages d'Administration (Super Admin uniquement)
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/super-admin/dashboard.xhtml` | `SUPER_ADMIN` | Dashboard super-admin |
|
||||
| `/super-admin/dashboard-enhanced.xhtml` | `SUPER_ADMIN` | Dashboard enrichi super-admin |
|
||||
| `/super-admin/entites/gestion-enhanced.xhtml` | `SUPER_ADMIN` | Gestion des entités système |
|
||||
| `/super-admin/roles/gestion.xhtml` | `SUPER_ADMIN` | Gestion des rôles système |
|
||||
| `/super-admin/types/organisations.xhtml` | `SUPER_ADMIN` | Configuration types d'organisations |
|
||||
|
||||
---
|
||||
|
||||
## 2. Pages d'Administration d'Organisation
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/admin/audit.xhtml` | `ADMIN,SUPER_ADMIN` | Journal d'audit |
|
||||
| `/admin/backup.xhtml` | `ADMIN,SUPER_ADMIN` | Sauvegardes et restaurations |
|
||||
| `/admin/settings.xhtml` | `ADMIN,SUPER_ADMIN` | Paramètres organisation |
|
||||
| `/admin/users.xhtml` | `ADMIN,SUPER_ADMIN` | Gestion utilisateurs |
|
||||
| `/secure/admin/utilisateurs.xhtml` | `ADMIN,SUPER_ADMIN` | Liste utilisateurs |
|
||||
| `/secure/admin/audit.xhtml` | `ADMIN,SUPER_ADMIN` | Audit système |
|
||||
| `/secure/admin/parametres.xhtml` | `ADMIN,SUPER_ADMIN` | Paramètres avancés |
|
||||
| `/secure/admin/roles.xhtml` | `ADMIN,SUPER_ADMIN` | Gestion rôles organisation |
|
||||
| `/admin/audit/journal.xhtml` | `ADMIN,SUPER_ADMIN` | Journal détaillé |
|
||||
|
||||
---
|
||||
|
||||
## 3. Pages de Gestion des Membres
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/membre/inscription.xhtml` | `SECRETAIRE,ADMIN` | Inscription nouveau membre |
|
||||
| `/secure/membre/recherche.xhtml` | `SECRETAIRE,TRESORIER,RESPONSABLE_SOCIAL,RESPONSABLE_EVENEMENTS,ADMIN` | Recherche membres |
|
||||
| `/secure/membre/profil.xhtml` | `SECRETAIRE,ADMIN` | Modification profil membre |
|
||||
| `/secure/membre/import.xhtml` | `SECRETAIRE,ADMIN` | Import membres (CSV/Excel) |
|
||||
| `/secure/membre/export.xhtml` | `SECRETAIRE,TRESORIER,ADMIN` | Export membres |
|
||||
| `/secure/membre/cotisations.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Suivi cotisations membres |
|
||||
|
||||
---
|
||||
|
||||
## 4. Pages de Gestion Financière
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/admin/finance/caisse.xhtml` | `TRESORIER,ADMIN` | Gestion de caisse |
|
||||
| `/secure/finance/tresorerie.xhtml` | `TRESORIER,ADMIN` | Trésorerie organisation |
|
||||
| `/secure/finance/budgets.xhtml` | `TRESORIER,ADMIN` | Gestion budgets |
|
||||
| `/secure/finance/bilans.xhtml` | `TRESORIER,ADMIN` | Bilans financiers |
|
||||
| `/secure/comptabilite/gestion.xhtml` | `TRESORIER,ADMIN` | Comptabilité générale |
|
||||
| `/admin/cotisations/gestion.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Gestion cotisations |
|
||||
| `/secure/cotisation/collect.xhtml` | `TRESORIER,ADMIN` | Collection cotisations |
|
||||
| `/secure/cotisation/paiement.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Paiement cotisations |
|
||||
| `/secure/cotisation/reminders.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Relances cotisations |
|
||||
| `/secure/cotisation/report.xhtml` | `TRESORIER,ADMIN` | Rapports cotisations |
|
||||
| `/secure/cotisation/rapports.xhtml` | `TRESORIER,ADMIN` | Rapports détaillés |
|
||||
|
||||
---
|
||||
|
||||
## 5. Pages de Gestion des Événements
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/admin/evenements/liste.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Liste événements |
|
||||
| `/admin/evenements/creation.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Création événement |
|
||||
| `/admin/evenements/gestion.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Gestion événements |
|
||||
| `/admin/evenements/participants.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Gestion participants |
|
||||
| `/secure/evenement/creation.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Créer événement |
|
||||
| `/secure/evenement/gestion.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Gérer événements |
|
||||
| `/secure/evenement/create.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Formulaire création |
|
||||
| `/secure/evenement/planification.xhtml` | `RESPONSABLE_EVENEMENTS,ADMIN` | Planification événements |
|
||||
| `/secure/evenement/logistique.xhtml` | `RESPONSABLE_EVENEMENTS,ADMIN` | Logistique événements |
|
||||
| `/secure/evenement/bilan.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Bilans événements |
|
||||
| `/secure/evenement/reservations.xhtml` | `RESPONSABLE_EVENEMENTS,ADMIN` | Gestion réservations |
|
||||
| `/secure/evenement/participants.xhtml` | `RESPONSABLE_EVENEMENTS,SECRETAIRE,ADMIN` | Liste participants |
|
||||
| `/secure/evenement/calendar.xhtml` | `ALL` | Calendrier public événements |
|
||||
| `/secure/evenement/calendrier.xhtml` | `ALL` | Calendrier événements |
|
||||
| `/secure/evenement/participation.xhtml` | `ALL` | Mes participations |
|
||||
|
||||
---
|
||||
|
||||
## 6. Pages de Gestion des Aides Sociales
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/admin/aides/gestion.xhtml` | `RESPONSABLE_SOCIAL,ADMIN` | Gestion aides sociales |
|
||||
| `/admin/demandes/gestion.xhtml` | `RESPONSABLE_SOCIAL,ADMIN` | Gestion demandes |
|
||||
| `/admin/demandes/gestion-old.xhtml` | `RESPONSABLE_SOCIAL,ADMIN` | Ancienne interface (deprecated) |
|
||||
| `/admin/demandes/aide-sociale.xhtml` | `RESPONSABLE_SOCIAL,ADMIN` | Demandes aide sociale |
|
||||
| `/secure/aide/demande.xhtml` | `ALL` | Formulaire demande aide |
|
||||
| `/secure/aide/statistiques.xhtml` | `RESPONSABLE_SOCIAL,ADMIN` | Statistiques aides |
|
||||
| `/secure/aide/historique.xhtml` | `ALL` | Mon historique d'aides |
|
||||
|
||||
---
|
||||
|
||||
## 7. Pages d'Adhésion
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/adhesion/liste.xhtml` | `SECRETAIRE,ADMIN` | Liste adhésions |
|
||||
| `/secure/adhesion/demande.xhtml` | `ALL` | Formulaire demande adhésion |
|
||||
| `/secure/adhesion/new.xhtml` | `SECRETAIRE,ADMIN` | Nouvelle adhésion |
|
||||
| `/secure/adhesion/renouvellement.xhtml` | `ALL` | Renouvellement adhésion |
|
||||
| `/secure/adhesion/validation.xhtml` | `SECRETAIRE,ADMIN` | Validation adhésions |
|
||||
| `/secure/adhesion/history.xhtml` | `SECRETAIRE,ADMIN` | Historique adhésions |
|
||||
| `/secure/adhesion/historique.xhtml` | `ALL` | Mon historique adhésions |
|
||||
| `/secure/adhesion/pending.xhtml` | `SECRETAIRE,ADMIN` | Adhésions en attente |
|
||||
| `/secure/adhesion/cartes-membres.xhtml` | `SECRETAIRE,ADMIN` | Impression cartes membres |
|
||||
|
||||
---
|
||||
|
||||
## 8. Pages de Rapports
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/reports.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Rapports généraux |
|
||||
| `/secure/rapport/details.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Détails rapports |
|
||||
| `/secure/rapport/export.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Export rapports |
|
||||
| `/secure/rapport/activites.xhtml` | `SECRETAIRE,ADMIN` | Rapport activités |
|
||||
| `/secure/rapport/finances.xhtml` | `TRESORIER,ADMIN` | Rapport financier |
|
||||
| `/secure/rapport/membres.xhtml` | `SECRETAIRE,ADMIN` | Rapport membres |
|
||||
| `/secure/rapport/tableaux-bord.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Tableaux de bord |
|
||||
| `/admin/rapports/finances.xhtml` | `TRESORIER,ADMIN` | Rapports finances |
|
||||
| `/admin/rapports/statistiques.xhtml` | `ADMIN` | Statistiques globales |
|
||||
|
||||
---
|
||||
|
||||
## 9. Pages Personnelles (Tous les membres authentifiés)
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/profile.xhtml` | `ALL` | Mon profil |
|
||||
| `/secure/personnel/profil.xhtml` | `ALL` | Mon profil détaillé |
|
||||
| `/secure/personnel/activites.xhtml` | `ALL` | Mes activités |
|
||||
| `/secure/personnel/agenda.xhtml` | `ALL` | Mon agenda |
|
||||
| `/secure/personnel/documents.xhtml` | `ALL` | Mes documents |
|
||||
| `/secure/personnel/notifications.xhtml` | `ALL` | Mes notifications |
|
||||
| `/secure/personnel/preferences.xhtml` | `ALL` | Mes préférences |
|
||||
| `/secure/personnel/favoris.xhtml` | `ALL` | Mes favoris |
|
||||
| `/secure/personnel/parametres.xhtml` | `ALL` | Mes paramètres |
|
||||
| `/membre/cotisations.xhtml` | `ALL` | Mes cotisations |
|
||||
| `/membre/dashboard.xhtml` | `MEMBRE_ACTIF` | Dashboard membre |
|
||||
|
||||
---
|
||||
|
||||
## 10. Pages d'Aide et Support (Tous)
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/aide/faq.xhtml` | `ALL` | FAQ |
|
||||
| `/secure/aide/guide.xhtml` | `ALL` | Guide utilisateur |
|
||||
| `/secure/aide/support.xhtml` | `ALL` | Support technique |
|
||||
| `/secure/aide/tutoriels.xhtml` | `ALL` | Tutoriels vidéo |
|
||||
| `/secure/aide/nouveautes.xhtml` | `ALL` | Nouveautés |
|
||||
| `/secure/aide/apropos.xhtml` | `ALL` | À propos |
|
||||
| `/secure/aide/documentation.xhtml` | `ALL` | Documentation |
|
||||
| `/secure/aide/suggestions.xhtml` | `ALL` | Boîte à suggestions |
|
||||
| `/secure/aide/tickets.xhtml` | `ALL` | Mes tickets support |
|
||||
|
||||
---
|
||||
|
||||
## 11. Pages de Communication
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/communication/notifications.xhtml` | `SECRETAIRE,ADMIN` | Envoi notifications masse |
|
||||
|
||||
---
|
||||
|
||||
## 12. Pages de Documents
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/admin/documents/gestion.xhtml` | `SECRETAIRE,ADMIN` | Gestion documents |
|
||||
| `/secure/documents/mes-documents.xhtml` | `ALL` | Mes documents personnels |
|
||||
|
||||
---
|
||||
|
||||
## 13. Pages Utilitaires
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/outils/exports-masse.xhtml` | `TRESORIER,SECRETAIRE,ADMIN` | Exports en masse |
|
||||
| `/secure/stats.xhtml` | `ADMIN` | Statistiques système |
|
||||
| `/secure/souscription/dashboard.xhtml` | `ADMIN` | Dashboard souscriptions |
|
||||
|
||||
---
|
||||
|
||||
## 14. Pages Publiques (Accès libre)
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/public/home.xhtml` | Aucune auth requise | Page d'accueil |
|
||||
| `/public/formulaires.xhtml` | Aucune auth requise | Formulaires publics |
|
||||
|
||||
---
|
||||
|
||||
## 15. Pages Système
|
||||
|
||||
| Page | Rôles Autorisés | Description |
|
||||
|------|----------------|-------------|
|
||||
| `/secure/access-denied.xhtml` | Tous (page erreur) | Accès refusé |
|
||||
|
||||
---
|
||||
|
||||
## Règles de Sécurité
|
||||
|
||||
### Hiérarchie des Rôles
|
||||
|
||||
Les rôles suivent une hiérarchie où les rôles supérieurs héritent des permissions des rôles inférieurs :
|
||||
|
||||
```
|
||||
SUPER_ADMIN
|
||||
└─ ADMIN_ORGANISATION
|
||||
├─ TRESORIER
|
||||
├─ SECRETAIRE
|
||||
├─ RESPONSABLE_SOCIAL
|
||||
├─ RESPONSABLE_EVENEMENTS
|
||||
├─ RESPONSABLE_CREDIT
|
||||
└─ MEMBRE_BUREAU
|
||||
└─ MEMBRE_ACTIF
|
||||
└─ MEMBRE_SIMPLE
|
||||
```
|
||||
|
||||
### Principes de Sécurité
|
||||
|
||||
1. **Least Privilege** : Chaque utilisateur n'a accès qu'aux pages nécessaires à son rôle
|
||||
2. **Defense in Depth** : Sécurité à 3 niveaux :
|
||||
- Niveau 1 : Composant `page-access-control.xhtml` dans chaque page
|
||||
- Niveau 2 : Vérification dans les beans backing (`@PostConstruct`)
|
||||
- Niveau 3 : Sécurité backend (API REST)
|
||||
3. **Deny by Default** : Si aucun rôle n'est spécifié, l'accès est refusé
|
||||
4. **Audit Trail** : Tous les refus d'accès sont loggés
|
||||
|
||||
### Implémentation dans les Pages
|
||||
|
||||
Chaque page sécurisée doit inclure le composant de contrôle d'accès :
|
||||
|
||||
```xml
|
||||
<ui:composition template="/templates/layout/main.xhtml">
|
||||
<!-- Sécurisation de la page -->
|
||||
<ui:include src="/templates/components/security/page-access-control.xhtml">
|
||||
<ui:param name="allowedRoles" value="TRESORIER,ADMIN" />
|
||||
</ui:include>
|
||||
|
||||
<ui:define name="content">
|
||||
<!-- Contenu de la page -->
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
```
|
||||
|
||||
### Code Helper pour Vérifications Rapides
|
||||
|
||||
```java
|
||||
// Dans un bean backing
|
||||
@Inject
|
||||
PageSecurityBean pageSecurityBean;
|
||||
|
||||
// Vérifications
|
||||
if (pageSecurityBean.canManageFinances()) {
|
||||
// Action autorisée pour trésoriers
|
||||
}
|
||||
|
||||
if (pageSecurityBean.isSimpleMember()) {
|
||||
// Membre actif sans rôle administratif
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Maintenance
|
||||
|
||||
Cette matrice doit être mise à jour lorsque :
|
||||
- Une nouvelle page est créée
|
||||
- Un nouveau rôle est ajouté au système
|
||||
- Les permissions d'une page existante changent
|
||||
|
||||
**Responsable** : Équipe Architecture
|
||||
**Revue** : Trimestrielle ou à chaque release majeure
|
||||
Reference in New Issue
Block a user