From e58f488677ff4e1241dc006ce5d5104550146f5d Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 6 May 2020 11:34:08 -0600 Subject: [PATCH] Ring Group - Edit: RG Forward permission adjustment. --- app/ring_groups/ring_group_edit.php | 42 ++++++++++++++++------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index ce864d13df..5d40c8fd03 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -339,8 +339,10 @@ $array["ring_groups"][0]["ring_group_missed_call_app"] = $ring_group_missed_call_app; $array["ring_groups"][0]["ring_group_missed_call_data"] = $ring_group_missed_call_data; } - $array["ring_groups"][0]["ring_group_forward_enabled"] = $ring_group_forward_enabled; - $array["ring_groups"][0]["ring_group_forward_destination"] = $ring_group_forward_destination; + if (permission_exists('ring_group_forward')) { + $array["ring_groups"][0]["ring_group_forward_enabled"] = $ring_group_forward_enabled; + $array["ring_groups"][0]["ring_group_forward_destination"] = $ring_group_forward_destination; + } $array["ring_groups"][0]["ring_group_forward_toll_allow"] = $ring_group_forward_toll_allow; if (isset($ring_group_context)) { $array["ring_groups"][0]["ring_group_context"] = $ring_group_context; @@ -439,15 +441,15 @@ if ($action == "add") { //save the message to a session variable message::add($text['message-add']); - //redirect the browser - header("Location: ring_group_edit.php?id=".urlencode($ring_group_uuid)); - exit; } if ($action == "update") { //save the message to a session variable message::add($text['message-update']); } + //redirect the browser + header("Location: ring_group_edit.php?id=".urlencode($ring_group_uuid)); + exit; } //pre-populate the form @@ -1015,20 +1017,22 @@ echo "\n"; } - echo "\n"; - echo "\n"; - echo " ".$text['label-ring_group_forward']."\n"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo $text['description-ring-group-forward']."\n"; - echo "\n"; - echo "\n"; + if (permission_exists('ring_group_forward')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-ring_group_forward']."\n"; + echo "\n"; + echo "\n"; + echo " "; + echo ""; + echo "
\n"; + echo $text['description-ring-group-forward']."\n"; + echo "\n"; + echo "\n"; + } if (permission_exists('ring_group_forward_toll_allow')) { echo "\n";