docs(e2e): how to set the E2E account admin role (SQL + bootstrap) #141
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/pms-155-e2e-admin-howto"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Follow-up to #140. Expands the E2E account provisioning step with the exact mechanism for setting the account's admin role.
The E2E account reaches mokosh on the bunyip Resource-Server path (
ensure_user_from_bunyip), which resolves the request role from the mokoshuserstable row, not from the access token. The row is auto-created on first login with the defaultrole = 'technician', which is why the module specs 403. The README now documents:UPDATE users SET role = 'admin'to flip it (takes effect on the next request, no re-login),PUT /api/v1/users/{id}with{"role":"admin"}), andOAUTH_SUPER_ADMIN_EMAILSGoogle-path bootstrap for the first admin (noting it does not apply to the bunyip SSO path the E2E account uses).Docs only.
🤖 Generated with Claude Code
Expand the provisioning step with the exact mechanism. The E2E account reaches mokosh on the bunyip Resource-Server path (ensure_user_from_bunyip), which resolves the request role from the mokosh `users` table row, not from the access token; the row is auto-created with the default `role = 'technician'`. Document the direct-DB UPDATE to flip it to `admin`, the admin-API alternative (PUT /api/v1/users/{id}), and the OAUTH_SUPER_ADMIN_EMAILS Google-path bootstrap for the first admin (noting it does not apply to the bunyip SSO path the E2E account uses). #PMS-155 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>