class AccessTokenPolicy extends AbstractPolicy

Constants

GLOBAL

ALLOW

DENY

FORCE_ALLOW

FORCE_DENY

Methods

string
allow()

No description

string
deny()

No description

string
forceAllow()

No description

string
forceDeny()

No description

string|null
checkAbility(User $actor, string $ability, AbstractModel|null $instance)

No description

string|null
sanitizeResult(string|bool|null $result)

Allows `true` to be used in place of `->allow()`, and `false` instead of `->deny()` This allows more concise and intuitive code, by returning boolean statements:.

string|null
revoke(User $actor, AccessToken $token)

No description

Details

protected string allow()

Return Value

string

protected string deny()

Return Value

string

protected string forceAllow()

Return Value

string

protected string forceDeny()

Return Value

string

string|null checkAbility(User $actor, string $ability, AbstractModel|null $instance)

Parameters

User $actor
string $ability
AbstractModel|null $instance

Return Value

string|null

string|null sanitizeResult(string|bool|null $result)

Allows `true` to be used in place of `->allow()`, and `false` instead of `->deny()` This allows more concise and intuitive code, by returning boolean statements:.

WITHOUT THIS: `return SOME_BOOLEAN_LOGIC ? $this->allow() : $this->deny(); WITH THIS: `return SOME_BOOLEAN_LOGIC;

Parameters

string|bool|null $result

Return Value

string|null

string|null revoke(User $actor, AccessToken $token)

Parameters

User $actor
AccessToken $token

Return Value

string|null