mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on RBAC.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user