Skip to content
docsv0.9.0

PermissionResolver

Turns an identity + a request context into an inspectable decision: expand the actor's roles and lift its flat scopes into a {@see PermissionSet}, attaching provenance. Runs once per request. The reference implementation ({@see \Milpa\Auth\CatalogPermissionResolver}) is deliberately tenant-blind; a tenant-aware host swaps in its own — tenant membership is product policy, not auth vocabulary.

PermissionResolver::resolve()

abstract public function resolve(Milpa\Auth\Actor $actor, Milpa\Auth\PermissionContext $context): Milpa\Auth\PermissionSet

Resolves $actor's roles and scopes into a {@see PermissionSet}, scoped by $context.

Parameters

Parameters of resolve()
NameTypeDescription
$actorMilpa\Auth\Actor
$contextMilpa\Auth\PermissionContext