mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Add dialplan add temporary permissions.
This commit is contained in:
@@ -376,6 +376,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//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');
|
||||
|
||||
@@ -389,6 +391,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$dialplan_response = $orm->message;
|
||||
|
||||
//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');
|
||||
|
||||
|
||||
@@ -452,9 +452,11 @@ require_once "resources/header.php";
|
||||
if ($dialplan_uuid != '' && $_POST["persistformvar"] != "true") {
|
||||
|
||||
//add the dialplan permission
|
||||
$permission = "dialplan_edit";
|
||||
$p = new permissions;
|
||||
$p->add($permission, 'temp');
|
||||
$p->add("dialplan_add", 'temp');
|
||||
$p->add("dialplan_detail_add", 'temp');
|
||||
$p->add("dialplan_edit", 'temp');
|
||||
$p->add("dialplan_detail_edit", 'temp');
|
||||
|
||||
//get main dialplan entry
|
||||
$orm = new orm;
|
||||
@@ -476,7 +478,10 @@ require_once "resources/header.php";
|
||||
unset ($prep_statement);
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete($permission, 'temp');
|
||||
$p->delete("dialplan_add", 'temp');
|
||||
$p->delete("dialplan_detail_add", 'temp');
|
||||
$p->delete("dialplan_edit", 'temp');
|
||||
$p->delete("dialplan_detail_edit", 'temp');
|
||||
|
||||
//get dialplan detail conditions
|
||||
$sql = "select dialplan_detail_group, dialplan_detail_tag, dialplan_detail_type, dialplan_detail_data from v_dialplan_details ";
|
||||
|
||||
Reference in New Issue
Block a user