Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace permission_user with permission_role, enforce RBAC on admin routes, and limit operators to their assigned branches.
Co-authored-by: Cursor <cursoragent@cursor.com>
Fold follow-up migrations into init, expose GET /users/clients and /users/staff, and refresh seed data.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduces a branch_user join table linking branches to users, plus
create/delete API endpoints under the auth module for managing branch
assignments. The create response includes the branch's localized name
via a join. Regenerated swagger docs to include the new endpoints.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rename loan_required_documents to loan_order_required_docs, simplify document fields to name/value, and map loan_types columns to name, maturity, notes, and active.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rename users table fields and loan documents table, expand branch billing credentials, switch to /api/admin prefix, refactor auth endpoints, replace PATCH with PUT for status updates, remove file upload APIs, and regenerate Swagger with ordered tags.
Co-authored-by: Cursor <cursoragent@cursor.com>