feat(users): add user administration and password management
This commit is contained in:
parent
47f54d3461
commit
b584e60273
16 changed files with 720 additions and 22 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, EmailStr
|
||||
|
||||
from app.models.user import UserRole
|
||||
|
|
@ -18,7 +20,16 @@ class TokenResponse(BaseModel):
|
|||
|
||||
class UserRead(EntityRead):
|
||||
email: EmailStr
|
||||
full_name: str
|
||||
first_name: str
|
||||
last_name: str
|
||||
role: UserRole
|
||||
is_active: bool
|
||||
must_change_password: bool
|
||||
last_login_at: datetime | None = None
|
||||
password_changed_at: datetime | None = None
|
||||
|
||||
|
||||
class ChangePasswordRequest(BaseModel):
|
||||
current_password: str
|
||||
new_password: str
|
||||
new_password_confirmation: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue