Commit Graph

5 Commits

Author SHA1 Message Date
Agent Zero 75a7063bff feat(5.2): add User Preferences API with full-stack implementation
Backend:
- Create app/models/user_preference.py with TenantMixin (user_id, key, value JSONB)
- Create app/routes/user_preferences.py with GET/PUT/DELETE endpoints + RBAC
- Add user_preferences:read/write to CORE_PERMISSIONS
- Add user_preferences to legacy role permissions (admin/editor/viewer)
- Register route in app/main.py and app/routes/__init__.py
- Create alembic migration 0028_user_preferences
- Add UserPreference model to conftest.py for test schema
- Fix pre-existing conftest seed (Contact industry field removed in migration 0027)

Frontend:
- Create frontend/src/api/userPreferences.ts with React Query hooks
- Create frontend/src/hooks/useUserPreferences.ts syncing with uiStore
- Add i18n entries for de.json and en.json

Tests:
- 13 tests covering CRUD, tenant isolation, CSRF, unauthenticated access
- All tests passing
2026-07-23 20:39:42 +02:00
Agent Zero 879106c4eb Phase 1C: Frontend unified contact UI 2026-07-23 17:17:32 +02:00
Agent Zero beaca24480 feat: phase 3 - field-level permissions with plugin field definitions, service-layer filtering, 20 core field definitions 2026-07-15 23:02:30 +02:00
Agent Zero 08fd3ab72c feat: phase 2 - migrate all route guards to require_permission (75 guards, 21 files) 2026-07-15 22:35:50 +02:00
Agent Zero b490a62322 feat: granular RBAC system with user groups, deny-list, permission registry, system-admin, self-mod prevention 2026-07-15 21:59:45 +02:00