1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Service;
6:
7: use Illuminate\Http\Request;
8: use LaravelUi5\OData\Service\Contracts\QueryPlanInterface;
9: use LaravelUi5\OData\Service\Contracts\ReadAuthorizerInterface;
10:
11: /**
12: * The default read authorizer: records no verdict, so every read proceeds.
13: *
14: * Keeps unconfigured OData security-agnostic and backward-compatible — an actor who reaches
15: * a URL still gets the rows, exactly as before. A host that wants read gating binds its own
16: * {@see ReadAuthorizerInterface} (see the `odata.read_authorizer` config key).
17: */
18: final class AllowAllReadAuthorizer implements ReadAuthorizerInterface
19: {
20: public function authorize(QueryPlanInterface $plan, Request $request, ReadContext $read): void
21: {
22: // Intentionally empty — no denial recorded, the read proceeds.
23: }
24: }
25: