Update ivr_menu.php

IVR Menu - Add temporary permissions for adding or editing the dialplan.
This commit is contained in:
FusionPBX
2016-09-12 15:50:58 -06:00
committed by GitHub
parent a537084752
commit f6efae3830

View File

@@ -450,6 +450,13 @@ include "root.php";
//echo "</pre>\n";
//exit;
//add the dialplan permission
$p = new permissions;
$p->add("dialplan_add", 'temp');
$p->add("dialplan_detail_add", 'temp');
$p->add("dialplan_edit", 'temp');
$p->add("dialplan_detail_edit", 'temp');
//save the dialplan
$orm = new orm;
$orm->name('dialplans');
@@ -465,6 +472,12 @@ include "root.php";
//echo "</pre>\n";
//exit;
//remove the temporary permission
$p->delete("dialplan_add", 'temp');
$p->delete("dialplan_detail_add", 'temp');
$p->delete("dialplan_edit", 'temp');
$p->delete("dialplan_detail_edit", 'temp');
//synchronize the xml config
save_dialplan_xml();