Don't allow access to manage page if server failed installing

This commit is contained in:
Dane Everitt 2018-05-23 22:23:26 -07:00
parent db9b80fe78
commit 0e1b4661ce
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 13 additions and 7 deletions

View file

@ -376,9 +376,15 @@ class ServersController extends Controller
*
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\View\View
*
* @throws \Pterodactyl\Exceptions\DisplayException
*/
public function viewManage(Server $server)
{
if ($server->installed > 1) {
throw new DisplayException('This server is in a failed installation state and must be deleted and recreated.');
}
return view('admin.servers.view.manage', ['server' => $server]);
}