Allow copying of permissions when cloning a zone.

This commit is contained in:
Richard Underwood 2017-11-20 15:38:28 +00:00
parent 19a8e2c223
commit e1df632852
3 changed files with 28 additions and 0 deletions

View file

@ -522,6 +522,7 @@ case "export":
case "clone":
$name = $_POST['destname'];
$src = $_POST['sourcename'];
$copypermissions = $_POST['copypermissions'];
if (!is_adminuser() and $allowzoneadd !== true) {
jtable_respond(null, 'error', "You are not allowed to add zones");
@ -566,6 +567,10 @@ case "clone":
$zone = $api->savezone($srczone->export());
if($copypermissions==1) {
copy_permissions($src,$name);
}
writelog("Cloned zone $src into $name");
jtable_respond($zone, 'single');
break;