Files
leocrm/app/routes/__init__.py
T
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

26 lines
658 B
Python

"""Routes package."""
from app.routes import (
addresses, # noqa: F401
ai_copilot, # noqa: F401
audit, # noqa: F401
auth, # noqa: F401
contacts, # noqa: F401
entity_history, # noqa: F401
currencies, # noqa: F401
taxes, # noqa: F401
sequences, # noqa: F401
system_settings, # noqa: F401
attachments, # noqa: F401
health, # noqa: F401
import_export, # noqa: F401
metrics, # noqa: F401
notifications, # noqa: F401
plugins, # noqa: F401
roles, # noqa: F401
tenants, # noqa: F401
users, # noqa: F401
user_preferences, # noqa: F401
workflows, # noqa: F401
)