Class AuditAccess
Whether a caller may read the audit log, and for which team.
public static class AuditAccess
- Inheritance
-
AuditAccess
- Inherited Members
Remarks
Extracted so every surface — the Blazor view, the REST endpoint, and anything added later — asks the same question of the same code. The rule restated per surface is the rule that drifts: three places deciding "may this caller read audit" is three chances for one of them to be wrong, and the one that is wrong is the one nobody tested.
Methods
CanRead(ClaimsPrincipal, string)
Whether principal may read audit entries for teamKey, or
across every team when it is null.
public static bool CanRead(ClaimsPrincipal principal, string teamKey)
Parameters
principalClaimsPrincipalteamKeystring
Returns
Remarks
For one team: audit:read held on that team, however the caller came by it — an
access level, a tenant role, a scope override — or held system-wide.
Across all teams: a system grant only. A team grant is issued for the selected team, so
accepting it here would let a team administrator read every team's log — the hole the
Scope / SystemScope provenance split closed.