diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 57f7040e28553377f1e34cf9b77dc178c557b98c..0cc7bc77add2e11d540df99b4d57d05ac98d4c17 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -1,7 +1,7 @@ remoting_lib->loadFormDef('../dns/form/dns_soa.tform.php'); return $app->remoting_lib->getDataRecord($primary_id); } + + //* Add a slave zone + public function dns_slave_add($session_id, $client_id, $params) + { + if(!$this->checkPerm($session_id, 'dns_zone_add')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + return $this->insertQuery('../dns/form/dns_slave.tform.php', $client_id, $params); + } + + //* Update a slave zone + public function dns_slave_update($session_id, $client_id, $primary_id, $params) + { + if(!$this->checkPerm($session_id, 'dns_zone_update')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../dns/form/dns_slave.tform.php', $client_id, $primary_id, $params); + return $affected_rows; + } + + //* Delete a slave zone + public function dns_slave_delete($session_id, $primary_id) + { + if(!$this->checkPerm($session_id, 'dns_zone_delete')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + return $this->deleteQuery('../dns/form/dns_slave.tform.php', $primary_id); + } //* Get record id by origin public function dns_zone_get_id($session_id, $origin)