UI: Role-based visibility for command buttons #42

Open
opened 2026-03-14 12:38:48 +01:00 by claude · 1 comment
Owner

Context

RBAC is now enforced server-side (a4de2a7). The UI should respect roles to avoid showing controls that will return 403.

Requirements

  • Decode JWT roles claim on the frontend (base64 decode the payload)
  • Hide "Send Command" buttons on agent pages for VIEWER users
  • Hide admin nav items for non-ADMIN users
  • Show a graceful message if a 403 is returned (defensive, in case roles change mid-session)

Roles

Role Can see commands Can see admin
VIEWER No No
OPERATOR Yes No
ADMIN Yes Yes
## Context RBAC is now enforced server-side (a4de2a7). The UI should respect roles to avoid showing controls that will return 403. ## Requirements - Decode JWT `roles` claim on the frontend (base64 decode the payload) - Hide "Send Command" buttons on agent pages for VIEWER users - Hide admin nav items for non-ADMIN users - Show a graceful message if a 403 is returned (defensive, in case roles change mid-session) ## Roles | Role | Can see commands | Can see admin | |------|-----------------|---------------| | VIEWER | No | No | | OPERATOR | Yes | No | | ADMIN | Yes | Yes |
Author
Owner

Blocked — No agent command UI exists yet. The role gating pattern is in place (ADMIN check on OidcAdminPage), but there are no command buttons to gate. This issue is blocked until the command UI is built.

**Blocked** — No agent command UI exists yet. The role gating pattern is in place (ADMIN check on OidcAdminPage), but there are no command buttons to gate. This issue is blocked until the command UI is built.
Sign in to join this conversation.