InfraGuard

Access levels (demo · staff · admin)

InfraGuard's single access-control model: compare the user_level integer against each screen's min_req.

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.

  1. Menu render — items where min_req > user_level are hidden from the sidebar.
  2. 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

Where levels are assigned — the users screen
Where levels are assigned — the users screen