fix: ensure authorization check for server view in mount method
This commit is contained in:
parent
9cd8dff5bf
commit
5661c136f5
1 changed files with 3 additions and 2 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue