Two Dimensions of Access
Every user has both a role (what they can do) and a tier (what features they can see).Roles
| Role | Can View | Can Edit | Can Admin |
|---|---|---|---|
admin | Everything | Everything | Users, periods, sports, budgets, peer groups |
agreement_manager | Everything | Athletes, deals, notes | No |
read_only | Everything | Nothing | No |
require_role() FastAPI dependency:
Tiers
| Tier | Features |
|---|---|
standard | All core features: deals, athletes, budget, reporting, upload wizard |
premium | Everything in standard + benchmark grid, peer group comparisons, conference percentiles |
require_tier() FastAPI dependency:
auth.isPremium computed property controls visibility:
Sport Limitations
Users can optionally havesport_limitations (UUID array) that restricts which sports they can manage. Not enforced at query level yet — designed for future implementation.
JWT Token Contents
role and tier fields are included in the token but the actual enforcement loads the User from the database on every request (not from the token) to ensure changes take effect immediately.