Files
evig/src/middleware
g-butandClaude Opus 4.5 f92861ae9e refactor: consolidate auth system and split god components
Phase 1 - Auth consolidation:
- Remove legacy role system from constants.ts (ROLE_PERMISSIONS, etc.)
- Update API routes to use is_staff instead of ADMIN_ROLES
- Update role-checks.ts to use seller_profiles/repairer_profiles tables

Phase 2 - Split god components:
- ProductManagement.tsx: 921 -> 257 lines (extract 7 sub-components)
- WorkshopRegistrationForm.tsx: 590 -> 373 lines (extract 5 components)
- VoiceRecorder.tsx: 563 -> 153 lines (extract 3 hooks, 4 components)

Phase 3 - Audit logging:
- Add logPermissionsChange() and logSuperAdminChange() to audit.ts
- Add audit logging to permissions API route

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 23:18:29 +01:00
..