Skip to content

feat(web): gate task queue + failed tasks behind admin role#130

Merged
ssarunic merged 1 commit into
mainfrom
feat/admin-pipeline-gating
Jun 9, 2026
Merged

feat(web): gate task queue + failed tasks behind admin role#130
ssarunic merged 1 commit into
mainfrom
feat/admin-pipeline-gating

Conversation

@ssarunic

@ssarunic ssarunic commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Move the operator-only pipeline views (Task Queue, Failed Tasks) into a dedicated Admin nav section and gate them behind a real is_admin role, enforced on both the UI and the API. Prepares for multi-user where ordinary users should neither see nor control the global queue.

  • models/User: add is_admin (preserved across logins, like region)
  • users schema + idempotent ALTER TABLE migration for is_admin
  • single-user default user is created as admin; require_admin dependency treats single-user mode as always-admin, requires the flag in multi-user
  • apply require_admin to the 8 global queue + DLQ routes (per-episode pipeline controls stay available to regular users)
  • frontend: isAdmin in AuthContext, conditional Admin nav section in Layout + NavigationDrawer, AdminRoute guard on /queue and /failed
  • tests: add is_admin to the hand-rolled user-table fixtures

Move the operator-only pipeline views (Task Queue, Failed Tasks) into a
dedicated Admin nav section and gate them behind a real is_admin role,
enforced on both the UI and the API. Prepares for multi-user where
ordinary users should neither see nor control the global queue.

- models/User: add is_admin (preserved across logins, like region)
- users schema + idempotent ALTER TABLE migration for is_admin
- single-user default user is created as admin; require_admin dependency
  treats single-user mode as always-admin, requires the flag in multi-user
- apply require_admin to the 8 global queue + DLQ routes (per-episode
  pipeline controls stay available to regular users)
- frontend: isAdmin in AuthContext, conditional Admin nav section in
  Layout + NavigationDrawer, AdminRoute guard on /queue and /failed
- tests: add is_admin to the hand-rolled user-table fixtures
@ssarunic ssarunic merged commit 164e354 into main Jun 9, 2026
5 checks passed
@ssarunic ssarunic deleted the feat/admin-pipeline-gating branch June 9, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant