From c8f5052f637ecb20bec306a47cabad7ecd3f8828 Mon Sep 17 00:00:00 2001 From: Cristi Jora Date: Sun, 30 Nov 2025 18:19:06 +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 988ff84b5..6cfcdf13a 100644 --- a/src/Eager/RelatedCollection.php +++ b/src/Eager/RelatedCollection.php @@ -164,8 +164,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)); }