Interface BeforePolicyInterface
This interface should be implemented if a policy class needs to perform a pre-authorization check before the action access check takes place.
Namespace: Authorization\Policy
Method Summary
-
before() public
Defines a pre-authorization check.
Method Detail
before() ΒΆ public
before(Authorization\IdentityInterface|null $identity, mixed $resource, string $action): Authorization\Policy\ResultInterface|bool|null
Defines a pre-authorization check.
If a boolean value is returned, the action check will be skipped and pre-authorization
check result will be returned. In case of null
, the action check will take place.
Parameters
-
Authorization\IdentityInterface|null
$identity Identity object.
-
mixed
$resource The resource being operated on.
-
string
$action The action/operation being performed.
Returns
Authorization\Policy\ResultInterface|bool|null