From ee39315b045bb65160fb89d7b4ec6fc653c2fed3 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 29 Oct 2024 14:40:07 +0100 Subject: [PATCH] update visible check for "admin" menu item --- app/Providers/Filament/AppPanelProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/Filament/AppPanelProvider.php b/app/Providers/Filament/AppPanelProvider.php index aa46e6efa6..39bfc50690 100644 --- a/app/Providers/Filament/AppPanelProvider.php +++ b/app/Providers/Filament/AppPanelProvider.php @@ -51,7 +51,7 @@ public function panel(Panel $panel): Panel ->url('/admin') ->icon('tabler-arrow-forward') ->sort(5) - ->visible(fn (): bool => auth()->user()->isRootAdmin()), + ->visible(fn (): bool => auth()->user()->canAccessPanel($panel)), ]) ->favicon(config('app.favicon', '/pelican.ico')) ->brandName(config('app.name', 'Pelican'))