From c1ab76546272c15e8809a93a28d6f7104ff1ed72 Mon Sep 17 00:00:00 2001 From: Cristi Jora Date: Sun, 30 Nov 2025 18:29:13 +0200 Subject: [PATCH] Improve related authorized checks --- src/Eager/RelatedCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Eager/RelatedCollection.php b/src/Eager/RelatedCollection.php index ed032b7a4..440bb5bb1 100644 --- a/src/Eager/RelatedCollection.php +++ b/src/Eager/RelatedCollection.php @@ -180,8 +180,8 @@ public function forRequest(RestifyRequest $request, Repository $repository): sel return $this ->intoAssoc() - ->authorized($request) ->inRequest($request, $repository) + ->authorized($request) ->when($request->isShowRequest(), fn (self $collection) => $collection->forShow($request, $repository)) ->when($request->isIndexRequest(), fn (self $collection) => $collection->forIndex($request, $repository)) ->when($repository->detectMcpRequest(), fn (self $collection) => $collection->forIndex($request, $repository));