mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-07-25 19:54:09 +03:00
Allow copying of permissions when cloning a zone.
This commit is contained in:
parent
19a8e2c223
commit
e1df632852
3 changed files with 28 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue