mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-16 03:40:06 +02:00
Implement a new hardcoded permissions system for enhanced user access control
This commit replaces the previous dynamic, database-driven permissions system with a hardcoded, role-based access control (RBAC) structure. New files in `client/src/lib/permissions.ts` and `server/permissions.ts` define permissions per module and role, simplifying management and improving performance. Database tables related to roles, permissions, and user roles have been removed, and associated storage interface methods and routes have been deprecated or updated to reflect the new architecture. The `replit.md` file has also been updated to document these significant changes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/7SnSmh4
This commit is contained in:
1 parent
70da3e9f5b
commit
df479800e3
9 files changed
+441
-873
No files matched your search
@@ -79,6 +79,25 @@ Preferred communication style: Simple, everyday language.
|
||||
|
||||
## Recent Changes
|
||||
|
||||
### August 11, 2025 - Permissions System Overhaul & User Management Improvements
|
||||
|
||||
#### Hardcoded Permissions System Implementation
|
||||
- **Migration from Database to Code**: Replaced flexible database-driven permissions with hardcoded permission system for better performance and control
|
||||
- **New Architecture**:
|
||||
- Created `client/src/lib/permissions.ts` and `shared/permissions.ts` with role-based module permissions
|
||||
- Implemented server-side middleware `server/permissions.ts` for route protection
|
||||
- Removed database tables: `roles`, `permissions`, `rolePermissions`, `userRoles`
|
||||
- Cleaned up storage interface and routes from old permission system
|
||||
- **Permission Matrix by Module**:
|
||||
- **Dashboard**: All roles can view
|
||||
- **Calendar/Orders/Deliveries**: Admin/Directeur full access, Manager all except delete, Employee view only
|
||||
- **Reconciliation**: Admin full access, Directeur all except delete, Manager/Employee no access
|
||||
- **Publicity**: Admin full access, others view only
|
||||
- **Customer Orders**: Admin/Directeur full access, Manager all except delete, Employee view + create
|
||||
- **DLC**: Admin/Directeur full access, Manager all except delete, Employee create + view
|
||||
- **Tasks**: Admin/Directeur full access, Manager view + validate, Employee view only
|
||||
- **Benefits**: Improved performance, simplified maintenance, no database queries for permission checks
|
||||
|
||||
### August 11, 2025 - User Management Improvements
|
||||
|
||||
#### User Deletion Fix
|
||||
|
||||
Reference in new issue
Block a user