Vyasa Extension Refactor Audit and Execution Plan

Architecture Decision FrameworkURL copied

Deepening OpportunitiesURL copied

9. Admin UI ModuleURL copied

Files:

  • vyasa/admin_views.py
  • vyasa/auth/**
  • vyasa/rbac_config.py
  • vyasa/rbac_store.py

Problem:

  • RBAC policy is core, but admin UI is optional feature behavior.
  • Keeping both together makes the auth seam too wide.

Solution:

  • Keep auth/RBAC checks and stores in core.
  • Move admin pages and assets into builtin:admin.
  • Admin extension declares route prefix and required RBAC capability.

Benefits:

  • Leverage: core policy remains small and reusable.
  • Locality: admin page behavior is isolated.
  • Tests: core auth tests do not need admin HTML; admin tests use fake users.