feat(backend): invite system + user management
- InviteToken model with unique token for each invite
- POST /users/invite - create invite by email with role (admin/mecanic)
- POST /auth/accept-invite - accept invite, set password, return JWT
- GET /users - list all users in tenant
- DELETE /users/{id} - deactivate user (cannot deactivate owner)
- Alembic migration for invites table
- 25 passing tests (auth + sync + orders + pdf + portal + invoices + users)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ from app.db.models.catalog import (
|
||||
from app.db.models.invoice import Invoice
|
||||
from app.db.models.appointment import Appointment
|
||||
from app.db.models.mecanic import Mecanic
|
||||
from app.db.models.invite import InviteToken
|
||||
|
||||
__all__ = [
|
||||
"Tenant",
|
||||
@@ -32,4 +33,5 @@ __all__ = [
|
||||
"Invoice",
|
||||
"Appointment",
|
||||
"Mecanic",
|
||||
"InviteToken",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user