From 59c3cc6ce1ce9cfa2827f557684fc822934e690b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 8 Feb 2024 13:46:43 +0100 Subject: [PATCH] Refactor admin authentication logic in Index component --- 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 888a29233..1908fe107 100644 --- a/app/Livewire/Admin/Index.php +++ b/app/Livewire/Admin/Index.php @@ -11,7 +11,7 @@ class Index extends Component public $users = []; public function mount() { - if (!isInstanceAdmin() && session('adminToken') === null) { + if (!isInstanceAdmin()) { return redirect()->route('dashboard'); } $this->users = User::whereHas('teams', function ($query) {