Two Dimensions of Access
Every user has both a role (what they can do) and a tier (what features they can see).Roles
Enforced via
require_role() FastAPI dependency:
Tiers
Enforced via
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.