fix: ensure authorization check for server view in mount method

This commit is contained in:
Andras Bacsai 2026-01-02 19:51:09 +01:00
parent 9cd8dff5bf
commit 5661c136f5

View file

@ -52,9 +52,10 @@ public function mount()
$serverUuid = request()->route('server_uuid');
$teamId = currentTeam()->id;
$server = Server::where('team_id', $teamId)->where('uuid', $serverUuid)->first();
if (!$server) {
if (! $server) {
return redirect()->route('dashboard');
}
$this->authorize('view', $server);
$this->server = $server;
$this->getDevView();
}
@ -180,4 +181,4 @@ public function render()
{
return view('livewire.shared-variables.server.show');
}
}
}