Node page shows admin-only buttons to non-admins (Restart OP25, override Ack/Force Revert): dead CTAs #222

Closed
opened 2026-10-04 20:08:46 -04:00 by logan · 1 comment
Owner

Found while building the #213 item 3 picker (PR #220). Searched open and closed issues for a duplicate and found none.

drb-frontend/app/nodes/[id]/page.tsx renders these controls to every signed-in user, but the routes behind them are admin-only, so an org owner, operator or member who clicks one gets a raw error:

  • Restart OP25 → POST /nodes/{id}/command → require_service_key_or_admin.
  • Ack (Reset 24h Timer) → POST /nodes/{id}/override/ack → require_service_key_or_admin.
  • Force Revert Config → POST /nodes/{id}/override/reset → require_service_key_or_admin.
  • Possibly also Configure / Reassign System (POST /nodes/{id}/config/{system_id}): check its auth.

Fix: either gate them on isAdmin in the UI, or widen the routes to the node's org owner or owning operator, using the same rule PR #220 uses for Discord streams (routers/discord_web.py::_node_for_caller). Which one is a product call: should org owners be able to restart their own node's decoder?

PR #220 already moved the Discord Join/Leave buttons off /command. They had the same problem.

Found while building the #213 item 3 picker (PR #220). Searched open and closed issues for a duplicate and found none. `drb-frontend/app/nodes/[id]/page.tsx` renders these controls to every signed-in user, but the routes behind them are admin-only, so an org owner, operator or member who clicks one gets a raw error: - **Restart OP25** → `POST /nodes/{id}/command` → `require_service_key_or_admin`. - **Ack (Reset 24h Timer)** → `POST /nodes/{id}/override/ack` → `require_service_key_or_admin`. - **Force Revert Config** → `POST /nodes/{id}/override/reset` → `require_service_key_or_admin`. - Possibly also **Configure / Reassign System** (`POST /nodes/{id}/config/{system_id}`): check its auth. Fix: either gate them on `isAdmin` in the UI, or widen the routes to the node's org owner or owning operator, using the same rule PR #220 uses for Discord streams (`routers/discord_web.py::_node_for_caller`). Which one is a product call: should org owners be able to restart their own node's decoder? PR #220 already moved the Discord Join/Leave buttons off `/command`. They had the same problem.
logan added the area/autharea/frontend
kind
behavior-bug
priority
p2
type
bug
labels 2026-10-05 02:05:05 -04:00
Author
Owner

UX pass 2026-10-25: confirmed the open question. Configure/Reassign System (app/nodes/[id]/page.tsx, NodeConfigModal) is shown to everyone and POST /nodes/{id}/config/{system_id} is require_service_key_or_admin (nodes.py:250-256). Same for the 'Needs Configuration' cards on /nodes, which operators can reach (nodes/page.tsx:20) -- so the first-run setup action 403s for operators and owners. Also PATCH /nodes/{id} (SdrSettings is already canEdit-gated, fine). Fix scope should include Configure/Reassign. Related new issue: #283 (systems page).

UX pass 2026-10-25: confirmed the open question. Configure/Reassign System (app/nodes/[id]/page.tsx, NodeConfigModal) is shown to everyone and POST /nodes/{id}/config/{system_id} is require_service_key_or_admin (nodes.py:250-256). Same for the 'Needs Configuration' cards on /nodes, which operators can reach (nodes/page.tsx:20) -- so the first-run setup action 403s for operators and owners. Also PATCH /nodes/{id} (SdrSettings is already canEdit-gated, fine). Fix scope should include Configure/Reassign. Related new issue: #283 (systems page).
logan closed this issue 2026-10-25 22:17:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logan/server-26#222