mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-19 13:08:23 +02:00
Fix task access and visibility for employee role users
Update client/src/pages/Tasks.tsx to restrict user fetching and action button visibility based on role ('admin', 'manager', 'directeur'). Also addresses 403 errors for employees in server routes.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/vMSppUD
This commit is contained in:
1 parent
b986763b6c
commit
b9b85fba78
4 files changed
+163
-27
No files matched your search
@@ -6,7 +6,19 @@
|
||||
|
||||
## CORRECTIONS À APPLIQUER SUR VOTRE SERVEUR PRIVÉ
|
||||
|
||||
### 1️⃣ FICHIER: server/routes.ts SEULEMENT
|
||||
### 1️⃣ FICHIER: client/src/pages/Tasks.tsx
|
||||
**Correction erreur 403 /api/users**
|
||||
|
||||
#### A) Ligne 84-85 (requête des utilisateurs):
|
||||
```typescript
|
||||
// REMPLACER:
|
||||
enabled: !!user,
|
||||
|
||||
// PAR:
|
||||
enabled: !!user && (user.role === 'admin' || user.role === 'manager' || user.role === 'directeur'),
|
||||
```
|
||||
|
||||
### 2️⃣ FICHIER: server/routes.ts
|
||||
**Les permissions dans shared/permissions.ts restent inchangées**
|
||||
|
||||
#### A) Route GET /api/suppliers (environ ligne 188-194):
|
||||
|
||||
Reference in new issue
Block a user