From d87a0fe74fc5bf8cb541848ddb44bd30e39e1026 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 12 Feb 2024 11:53:28 +0100 Subject: [PATCH] Refactor authentication check in Index.php --- app/Livewire/Admin/Index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Livewire/Admin/Index.php b/app/Livewire/Admin/Index.php index 95a7dd2ae..4ff4ff21b 100644 --- a/app/Livewire/Admin/Index.php +++ b/app/Livewire/Admin/Index.php @@ -14,7 +14,7 @@ public function mount() if (!isCloud()) { return redirect()->route('dashboard'); } - if (!isInstanceAdmin() && session('adminToken') === null) { + if (auth()->user()->id !== 0 && session('adminToken') === null) { return redirect()->route('dashboard'); } $this->users = User::whereHas('teams', function ($query) {