← All docs

Admin API — Route Role Map

Every route in apps/backend/apps/admin, mapped to the minimum granular role scope that unlocks it. In addition, every scoped route also accepts the blanket admin and super_admin roles (see below), so the scope shown is the lowest-privilege way in, not the only one.
The granular scopes are independent of each other — holding user_administration_read lets you view player data but not moderate, and write scopes do not imply read (grant both if the UI reads before writing). But there is a hierarchy on top: the guard authorizes if the user holds any role listed on the route, and every scoped route also lists admin and super_admin. So super_admin satisfies every route, and admin satisfies every route except the two super_admin-only actions (generating multiplayer hashes and changing a user's roles). The scope column is therefore the minimum role, not an exclusive one. any means the route has no scope gate — either fully public, or requiring only that the caller holds some admin role.

Role model — what each scope covers

Every scoped route's decorator is @Roles(<granular scope>, admin, super_admin), and authorization passes if the user holds any of those. The granular scope below is the lowest-privilege role that unlocks the route; admin and super_admin also unlock it.

user_administration_read

user_administration_write

funds_write

platform_setup_read

platform_setup_write

payments_write

documents_write

admin

super_admin

Target-level protection — acting on super_admin accounts

any

Highest-blast-radius routes worth extra care

Gated by the roles above, but each deserves audit logging / secondary approval / rate limiting at the application layer:

Judgment calls worth reviewing