Refactor authentication check in Index.php
This commit is contained in:
parent
9a858f628d
commit
d87a0fe74f
@ -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 New Issue
Block a user