Logs a distinct db_viewer_accessed event (not just the earlier session_created "requested" event) when an admin's browser actually completes the hand-off into Adminer. Adds a password-confirmed account-deletion box to Settings, relying on the existing ON DELETE CASCADE foreign keys to clean up everything the account owns. Adds an admin-only "require password change" flag that get_current_user enforces server-side (403 on everything except /auth/me, /auth/change-password, /auth/logout) - meant for handing a demo account to someone with a known sample password. Co-Authored-By: Claude Sonnet 5 <[email protected]>
22 lines
374 B
Python
22 lines
374 B
Python
from __future__ import annotations
|
|
|
|
import uuid
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class UserResponse(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: uuid.UUID
|
|
email: str
|
|
display_name: str
|
|
timezone: str
|
|
is_active: bool
|
|
is_admin: bool
|
|
must_change_password: bool
|
|
|
|
|
|
class MeResponse(UserResponse):
|
|
auth_mode: str
|