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:
parent
f1a3008a50
commit
e8c175f385
14 changed files with 206 additions and 76 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue