feat(admin): allow setting owner when creating an account

Adds optional owner_email field to the Create Account modal. Superadmin
can specify an existing user's email to assign as account owner at
creation time. Backend 404s with a clear message if the email is unknown.
Error detail now surfaces to the toast instead of a generic message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-14 14:30:23 +00:00
parent c5b8229ef6
commit 0ed5977fee
4 changed files with 34 additions and 5 deletions

View File

@@ -126,6 +126,7 @@ class AdminAccountDetailResponse(AdminAccountListItem):
class AdminAccountCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=255)
plan: Literal["free", "pro", "team"] = "free"
owner_email: Optional[str] = Field(None, description="Email of an existing user to set as owner")
class AdminAccountUpdate(BaseModel):