Refactor authentication check in Index.php
This commit is contained in:
parent
9a858f628d
commit
d87a0fe74f
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue