Fix access control in Admin Index and hide Admin link in navbar

This commit is contained in:
Andras Bacsai
2024-02-08 13:54:16 +01:00
parent 59c3cc6ce1
commit 9350fb4b97
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ class Index extends Component
public $users = [];
public function mount()
{
if (!isInstanceAdmin()) {
if (auth()->user()->id !== 0) {
return redirect()->route('dashboard');
}
$this->users = User::whereHas('teams', function ($query) {