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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user