Web platform for Open Agent.
  • Svelte 49.2%
  • Rust 27.1%
  • TypeScript 18%
  • Shell 4.5%
  • CSS 0.5%
  • Other 0.7%
Find a file
Eduardo Flores 0d0316cecd
refactor: centralize role permissions instead of scattered role checks
Backend: single Permission enum + Role::allows() table in
auth/permissions.rs, replacing ad-hoc require_agent()/role comparisons
scattered across clients, policies, documents, and auth routes. Unit
tests assert every agent-only permission is denied to assistants.

Frontend: $lib/permissions.ts mirrors the same permission names; every
component that hides UI for assistants now calls allows(role, 'X')
instead of independently re-deriving role === 'agent'.

This is the fix for the class of bug where backend enforcement and
frontend visibility drifted (assistants could see delete buttons the
API would 401 on) — everything now reads from one table per side.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 16:54:23 -07:00
backend refactor: centralize role permissions instead of scattered role checks 2026-07-24 16:54:23 -07:00
frontend refactor: centralize role permissions instead of scattered role checks 2026-07-24 16:54:23 -07:00
garage feat: migrate document storage from local disk to Garage (S3) 2026-07-24 14:56:06 -07:00
scripts fix: cascade client/policy deletes and enforce assistant permissions 2026-07-24 16:47:03 -07:00
.env.example feat: migrate document storage from local disk to Garage (S3) 2026-07-24 14:56:06 -07:00
.gitignore feat: migrate document storage from local disk to Garage (S3) 2026-07-24 14:56:06 -07:00
docker-compose.yml feat: migrate document storage from local disk to Garage (S3) 2026-07-24 14:56:06 -07:00