diff --git a/client/src/components/Administration.tsx b/client/src/components/Administration.tsx index 4e68988..d820cd1 100644 --- a/client/src/components/Administration.tsx +++ b/client/src/components/Administration.tsx @@ -680,7 +680,7 @@ export default function Administration() { {user.email || "-"} {getRoleBadge(user.role)} - {stores.find(s => s.id === user.storeId)?.name || "-"} + {user.role === 'administrator' ? "Tous" : (stores.find(s => s.id === user.storeId)?.name || "-")} @@ -874,14 +874,13 @@ export default function Administration() { render={({ field }) => ( Magasin - field.onChange(parseInt(value))}> - Aucun magasin (accès à tous) {stores.map((store) => ( {store.name} diff --git a/replit.md b/replit.md index 7ed8794..0c90c21 100644 --- a/replit.md +++ b/replit.md @@ -170,6 +170,10 @@ Preferred communication style: Simple, everyday language. - ✅ Enhanced deletion confirmations in sales history and administration panels - ✅ Improved visual feedback with detailed confirmation dialogs showing item details - ✅ Added proper modal management with shadcn/ui AlertDialog components +- ✅ Fixed critical admin user permissions bug preventing profile modifications +- ✅ Added server-side protection against accidental admin role changes +- ✅ Enhanced UI with disabled role field for self-editing administrators +- ✅ Improved admin interface - "Tous" displayed for admin store access, no redundant store selector for admin profiles ### Database Backup & Recovery System (January 9, 2025) - ✅ Added complete database backup and restore functionality in administration panel