From fbe490dfd41cda4adcf876d38e07b71544f8ff9b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 5 Oct 2016 18:38:07 -0600 Subject: [PATCH] Update ring_group_edit.php --- app/ring_groups/ring_group_edit.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 2420ad0004..66927d2317 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -302,7 +302,12 @@ //prepare the array $array['ring_groups'][] = $_POST; $array['dialplans'][] = $dialplan; - + + //add the dialplan permission + $p = new permissions; + $p->add("dialplan_add", "temp"); + $p->add("dialplan_edit", "temp"); + //save to the data $orm = new orm; //$orm->name('ring_groups'); @@ -313,6 +318,10 @@ } $orm->save($array); $message = $orm->message; + + //remove the temporary permission + $p->delete("dialplan_add", "temp"); + $p->delete("dialplan_edit", "temp"); } //save the xml