Skip to content

Commit 721fb2a

Browse files
committed
Fixed: FS#828 - DNS Zones created by resellers from template/Wizard not linked to the client
1 parent 11b3daf commit 721fb2a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

interface/web/dns/dns_wizard.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@
137137
if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
138138
if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
139139

140+
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
141+
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {
142+
$sys_groupid = intval($_POST['client_group_id']);
143+
} elseif($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($_POST['client_group_id'])) {
144+
$sys_groupid = intval($_POST['client_group_id']);
145+
} else {
146+
$sys_groupid = $_SESSION["s"]["user"]["default_group"];
147+
}
148+
140149
$tform_def_file = "form/dns_soa.tform.php";
141150
$app->uses('tform');
142151
$app->tform->loadFormDef($tform_def_file);

0 commit comments

Comments
 (0)