fix(admin): allow owner and admin account roles in user creation and role management

Four places were hardcoded to engineer|viewer only:
- AccountRoleUpdate schema (user.py) — blocked PUT /admin/users/{id}/account-role at the API level
- AdminUserCreate schema (admin.py) — blocked creating users with owner/admin role
- AccountDetailPage role dropdowns (create form + inline member role changer)
- AccountsPage create user role dropdown

Now all four accept the full set: owner, admin, engineer, viewer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-14 13:24:17 +00:00
parent eba50e1f95
commit c5b8229ef6
5 changed files with 14 additions and 8 deletions

View File

@@ -266,7 +266,7 @@ export interface AdminUserCreate {
name: string
account_mode: 'existing' | 'personal'
account_display_code?: string
account_role?: 'engineer' | 'viewer'
account_role?: 'owner' | 'admin' | 'engineer' | 'viewer'
send_email: boolean
}