Skip to content
Corex

AccessUserDirectory

Corex\Access\AccessUserDirectory · interface · Core layer

grantUserAbility(int $userId, string $abilityKey): void

Section titled “grantUserAbility(int $userId, string $abilityKey): void”

revokeUserAbility(int $userId, string $abilityKey): void

Section titled “revokeUserAbility(int $userId, string $abilityKey): void”

Takes back an ability given to this person, not to their role. Nothing happens for a person who no longer exists (spec 112: an expiry still ends the grant).

holdsOwnAbility(int $userId, string $abilityKey): bool

Section titled “holdsOwnAbility(int $userId, string $abilityKey): bool”

Whether this person was given the ability themself: their own capabilities, not what their role or a filter adds. A grant whose ability was taken away elsewhere answers false.

Whether this account still exists.