PAR-195
0
RBAC UI polish: API-key mint role selector + friendlier 403 surfacing
DoneLowUnassignedTesksFeature
Follow-ups split out of PAR-187 (core RBAC UI shipped). Both minor:
- API-key mint role selector. Backend already supports
ApiKeyService.create(name, by, roleSlug)and new keys default to contributor; there's no UI selector yet. Add arolefield to the/keyscontrollerKeyReq+apiKeys.create(...)call, thread it throughlib/api.createKey+createApiKeyAction, and add a role<Select>(backend roles) to theApiKeysmint form so agents can be given an admin/viewer key. - Friendlier 403 surfacing.
lib/api.callthrows a rawtesks API … → 403 {"error":"…"}string on denial. Parse the backend's{ "error": … }body and show a clean message in the action error path (the 403 handler from PAR-185 already returns structured JSON).
Resources
- commit83d982e API keys: role on mint, owner role barred (PAR-195)ParadauxIO/tesks
Comments
tesks · Jun 16, 2026, 8:10 PM
Verified LIVE. (1) API-key mint role selector — role threaded through lib/api.createKey + createApiKeyAction, and a role <Select> in components/ApiKeys/ApiKeys.tsx. (2) Friendlier 403 — lib/api.ts call() parses the backend {error} body instead of surfacing a raw status string. Acceptance met.
Activity
- tesks changed status to Status → Done
- tesks commented
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit 83d982e — API keys: role on mint, owner role barred (PAR-195)
- tesks created the issue