mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-11 18:10:10 +08:00
- Implemented AuthSettingsTab for managing authentication settings including user registration and default roles. - Created UsersPage for managing users and roles, including user creation, editing, and deletion functionalities. - Added components for user and role management: UserEditorDrawer, RoleEditorDrawer, UsersTable, RolesTable, and PathRuleEditorDrawer. - Introduced QuickCreateRoleModal for quick role creation within user management. - Implemented permission management within roles, including path rules and user assignments. - Enhanced user experience with loading states and error handling in API interactions.
47 lines
807 B
Python
47 lines
807 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class Token(BaseModel):
|
|
access_token: str
|
|
token_type: str
|
|
|
|
|
|
class TokenData(BaseModel):
|
|
username: str | None = None
|
|
|
|
|
|
class User(BaseModel):
|
|
id: int
|
|
username: str
|
|
email: str | None = None
|
|
full_name: str | None = None
|
|
disabled: bool | None = None
|
|
is_admin: bool = False
|
|
|
|
|
|
class UserInDB(User):
|
|
hashed_password: str
|
|
|
|
|
|
class RegisterRequest(BaseModel):
|
|
username: str
|
|
password: str
|
|
email: str
|
|
full_name: str | None = None
|
|
|
|
|
|
class UpdateMeRequest(BaseModel):
|
|
email: str | None = None
|
|
full_name: str | None = None
|
|
old_password: str | None = None
|
|
new_password: str | None = None
|
|
|
|
|
|
class PasswordResetRequest(BaseModel):
|
|
email: str
|
|
|
|
|
|
class PasswordResetConfirm(BaseModel):
|
|
token: str
|
|
password: str
|