pub fn authorize(
record: &RepoRecord,
identity: Option<&Identity>,
action: AccessAction,
) -> boolExpand description
The per-repo policy function (ADR-011 §3 as amended by ADR-015 §2).
readon aPublicrepo → allowed for anyone, includingNone(anonymous-first-class — ADR-007’s operative clause).readon aPrivaterepo → identity required with a read grant.write→ identity required and a write-or-manage grant, on every repo (push is always authenticated).manage→ identity required plus amanagegrant — no anonymous path and no owner-bypass path.
Grant monotonicity is evaluated here; stored grant sets need not be
closed under it (backend.md §RepoRecord): a stored manage grant
satisfies manage, write, and read checks; a stored write
satisfies write and read; a stored read satisfies read.