Overview — what it does
Access control in InfraGuard turns on one axis: level (the user_level integer). Every screen and feature has a required level (min_req), and access is granted when your level ≥ the required level.
Roles and teams are informational labels. Only level actually opens permissions (→ Roles & teams).
The three standard levels
| Level | Value | Reach |
|---|---|---|
| demo | 1 | Read-only — view Overview, Infrastructure, Service, Assets |
| staff | 5 | Operate — the above + Security & Backup actions, most writes |
| admin | 10 | Everything — the above + Administration (users, collectors, policy, API keys) |
The Development section is
super_admin(9) only.
How it is enforced
Permissions are defended in two layers — never by hiding UI alone.
- Menu render — items where
min_req > user_levelare hidden from the sidebar. - Server-side middleware — route groups carry
infr.level:N, so direct URL access is blocked too. E.g./admin/*→ 10,/security/*→ 2,/backup/*→ 2.
your level (user_level) ≥ screen's required level (min_req) → allow
otherwise → 403
Extra confirmation for destructive actions
Destructive/security actions such as blocking, restoring or changing rules are level-gated and recorded in full to the audit log (infr_audit_log) (→ Audit log).
Lock badges in this manual
This docs site shows every article to everyone (the docs carry no secrets or live data). Articles about features you cannot open yet at your level simply show a lock badge next to the title ("Staff+", "Admin only") to indicate the level required to reach the real screen.
Related
