Add IP Aliasing (#72)

* complete support for IP Alias's throughout panel

Includes a database change and probably better allocation handling
anyways

closes #37
This commit is contained in:
Dane Everitt 2016-08-31 16:03:37 -04:00 committed by GitHub
parent f1a3008a50
commit e8c175f385
14 changed files with 206 additions and 76 deletions

View file

@ -194,9 +194,11 @@ class AjaxController extends Controller
{
$server = Server::getByUUID($uuid);
$allocation = Models\Allocation::findOrFail($server->allocation);
$this->authorize('set-connection', $server);
if ($request->input('connection') === $server->ip . ':' . $server->port) {
if ($request->input('connection') === $allocation->ip . ':' . $allocation->port) {
return response()->json([
'error' => 'You are already using this as your default connection.'
], 409);