Working on RBAC.

This commit is contained in:
charles-gauthereau
2024-10-27 15:56:43 +01:00
parent b62261896b
commit 4f8cb485c3
12 changed files with 150 additions and 16 deletions
+6
View File
@@ -1,4 +1,5 @@
from apps.base.schemas import Schema
from apps.users.roles import Role
class UserBase(Schema):
@@ -12,6 +13,7 @@ class UserCreate(UserBase):
class User(UserBase):
id: int
is_active: bool
role: Role
class Config:
from_attributes = True
@@ -28,3 +30,7 @@ class TokenData(Schema):
class UserInDB(User):
hashed_password: str
class AdminUserCreate(UserCreate):
role: Role