PermissionReport
A snapshot of what an actor can do in a context and WHY — actor, context, the roles it holds, and the resolved {@see PermissionSet} carrying per-permission provenance. The Admin-readiness seam. It answers "what / why / from where", never "why did this specific action fail" (that is per-check, and lives in {@see Exceptions\PermissionDeniedException}). Carries no denied/warnings and no timestamp.
PermissionReport::__construct()
public function __construct(Milpa\Auth\Actor $actor, Milpa\Auth\PermissionContext $context, array $roles, Milpa\Auth\PermissionSet $granted):Constructor for a permission report.
Parameters
| Name | Type | Description |
|---|---|---|
| $actor | Milpa\Auth\Actor | |
| $context | Milpa\Auth\PermissionContext | |
| $roles | list<string> | the role ids the actor holds |
| $granted | Milpa\Auth\PermissionSet |
PermissionReport::of()
public static function of(Milpa\Auth\Actor $actor, Milpa\Auth\PermissionContext $context, Milpa\Auth\Contracts\PermissionResolver $resolver): selfCreate a permission report from an actor, context, and permission resolver.
Parameters
| Name | Type | Description |
|---|---|---|
| $actor | Milpa\Auth\Actor | |
| $context | Milpa\Auth\PermissionContext | |
| $resolver | Milpa\Auth\Contracts\PermissionResolver |