feat: expose admin status to frontend via user API

Add is_admin field to UserResponse schema and update AuthContext to
fetch user profile after login, storing and exposing isAdmin boolean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 11:19:10 +01:00
parent 2e66186fac
commit bbc6f2c3f4
3 changed files with 41 additions and 10 deletions

View File

@@ -16,6 +16,7 @@ class UserResponse(CamelModel):
id: UUID
email: str
display_name: str | None = None
is_admin: bool = False
@router.post("/me", response_model=UserResponse)