DataSourceService
Corex\Config\Data\DataSourceService · class · Config layer
Projects source-declared operations through the current actor’s ability map.
Public API
Section titled “Public API”__construct(DataRegistry $registry, DataAccessPolicy $access, ?AccessRefusalRecorder $refusals)
Section titled “__construct(DataRegistry $registry, DataAccessPolicy $access, ?AccessRefusalRecorder $refusals)”catalog(int $actorId): array
Section titled “catalog(int $actorId): array”Every source this person may see. One whose records belong to a screen they may not open is not listed at all (spec 112, FR-029).
withheldFrom(int $actorId, string $sourceKey): ?string
Section titled “withheldFrom(int $actorId, string $sourceKey): ?string”The ability this person lacks to read this source at all: the ability of the screen its records belong to. Null when nothing is withheld.
label(string $sourceKey): string
Section titled “label(string $sourceKey): string”describe(int $actorId, string $sourceKey): array
Section titled “describe(int $actorId, string $sourceKey): array”mayExportPersonalData(int $actorId): bool
Section titled “mayExportPersonalData(int $actorId): bool”Whether this person may take personal data out of the site in a file (spec 109, D3). It is asked apart from what a source’s operations ask. Being allowed to export a model is being allowed to export what in it is not about a person.
authorize(int $actorId, string $sourceKey, string $operation): DataSource
Section titled “authorize(int $actorId, string $sourceKey, string $operation): DataSource”noteWithheld(int $actorId, string $sourceKey): void
Section titled “noteWithheld(int $actorId, string $sourceKey): void”Records in the access audit that this person was refused this source (FR-031).