Move DomainController::NODE* to Address::NODE*, make role mandatory in the database, change logic so that mail generated by the host comes from a node address.

This commit is contained in:
Deon George
2022-01-24 22:56:13 +11:00
parent efa7195633
commit d660d5a6df
15 changed files with 143 additions and 110 deletions

View File

@@ -93,7 +93,7 @@ class ZoneController extends Controller
'host_id'=>0,
'node_id'=>0,
'point_id'=>0,
'role'=>DomainController::NODE_ZC,
'role'=>Address::NODE_ZC,
]);
}
@@ -121,7 +121,7 @@ class ZoneController extends Controller
$default = $o->systems->where('pivot.default',TRUE);
if ($default->count() && $default->first()->addresses->pluck('role')->search(DomainController::NODE_ZC) !== FALSE)
if ($default->count() && $default->first()->addresses->pluck('role')->search(Address::NODE_ZC) !== FALSE)
abort(412);
if ($default->count() && ($default->first()->id != $request->sid))