pub fn authorize(
ctx: &ReqCtx,
allowed_roles: &[String],
resource: &str,
action: Action<'_>,
) -> boolExpand description
The one place the access decision is made, so the invariants live together:
- Auth unconfigured ⇒ allow (the panel is public while prototyping).
- A password-verified but MFA-pending session never passes.
Then: consult the registered Authorizer if there is one, otherwise fall
back to the historical allowed_roles ∩ ctx.roles() intersection — so with
no authorizer registered this is byte-for-byte the old is_authorized.