Skip to content
Corex

AccessGrantService

Corex\Config\Access\AccessGrantService · class · Config layer

The grants made by approving access requests, once they stand (spec 112, User Story 1): listed, revoked, ended by their expiry, and the pending requests a request may no longer make cancelled. An ability is taken back only when no other standing grant gives it to the same person: an ability request and an area request can give the same one.

__construct(AccessRequestStore $requests, AccessUserDirectory $users, AccessService $access, RequestableAbilities $requestable, ActivityService $activity, ?EventDispatcher $events)

Section titled “__construct(AccessRequestStore $requests, AccessUserDirectory $users, AccessService $access, RequestableAbilities $requestable, ActivityService $activity, ?EventDispatcher $events)”

The standing grants, each with what it gives and whether the person still holds it. A grant to an account that no longer exists gives nobody anything, and is not listed.

revoke(int $actorId, int $grantId, DateTimeImmutable $now): OperationResult

Section titled “revoke(int $actorId, int $grantId, DateTimeImmutable $now): OperationResult”

Ends every standing grant whose expiry has passed, and says how many.

cancelNotRequestable(DateTimeImmutable $now): int

Section titled “cancelNotRequestable(DateTimeImmutable $now): int”

Cancels the pending requests for what a request may no longer ask for (FR-008), and says how many. The person’s denied page then says how access is given instead.