Add profile management features

- Introduced profile update and password change functionalities in main.py.
- Added new ProfileUpdate and PasswordChange schemas in user.py.
- Updated base.html to include a profile link in the navigation and modified user chip for better accessibility.
- Enhanced CSS for user chip links to improve UI interaction.
This commit is contained in:
smueller
2026-07-07 15:26:29 +02:00
parent 9c75357150
commit 6b0402103a
5 changed files with 206 additions and 4 deletions

View File

@@ -8,6 +8,15 @@ class UserCreate(BaseModel):
role: str = Field(default="reader", pattern="^(admin|editor|reader)$")
class ProfileUpdate(BaseModel):
email: EmailStr
full_name: str = Field(min_length=2, max_length=255)
class PasswordChange(BaseModel):
new_password: str = Field(min_length=10, max_length=255)
class UserOut(BaseModel):
id: int
email: EmailStr