From ff8cef9471d20c5acacf8f6669325f19e2465cee Mon Sep 17 00:00:00 2001 From: Igor clauss Date: Wed, 18 Sep 2024 23:11:16 +0200 Subject: [PATCH] fixes bug #23 - with wrong routes for unauthenticated multinenancy users --- src/Tour/Traits/CanConstructRoute.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Tour/Traits/CanConstructRoute.php b/src/Tour/Traits/CanConstructRoute.php index e290e76..cd20c8a 100644 --- a/src/Tour/Traits/CanConstructRoute.php +++ b/src/Tour/Traits/CanConstructRoute.php @@ -16,6 +16,10 @@ public function getRoute($class): array|false|int|null|string return $this->route; } + if (!Filament::auth()->user()) { + return '/'; + } + if (Filament::getCurrentPanel()->getTenantModel()) { $tenants = Filament::getCurrentPanel()->getTenantModel()::find(Filament::auth()->user()->getTenants(Filament::getCurrentPanel()));