Paradaux

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:

  1. 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 a role field to the /keys controller KeyReq + apiKeys.create(...) call, thread it through lib/api.createKey + createApiKeyAction, and add a role <Select> (backend roles) to the ApiKeys mint form so agents can be given an admin/viewer key.
  2. Friendlier 403 surfacing. lib/api.call throws a raw tesks 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

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