From 00b5b798867d3aa4c1eeec8f6a4f77c7e2620f35 Mon Sep 17 00:00:00 2001 From: denisent <120752864+denisent@users.noreply.github.com> Date: Wed, 8 Feb 2023 19:03:40 -0700 Subject: [PATCH] separating status and hangup permissions (#6522) * separating status and hangup permissions Creating a status permission so status can be displayed independently from hangup cause. The combination of status within the hangup permissions has confused some conversations with admins and superadmins. * separating status and hangup permissions Creating a status permission so status can be displayed independently from hangup cause. The combination of status within the hangup permissions has confused some conversations with admins and superadmins. --- app/xml_cdr/app_config.php | 6 ++++-- app/xml_cdr/xml_cdr.php | 18 +++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index 47fcf3222a..a093559475 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -97,7 +97,6 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_search_hangup_cause"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_search_recording"; @@ -184,10 +183,13 @@ $apps[$x]['permissions'][$y]['name'] = "xml_cdr_mos"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; - $apps[$x]['permissions'][$y]['name'] = "xml_cdr_hangup_cause"; + $apps[$x]['permissions'][$y]['name'] = "xml_cdr_status"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "xml_cdr_hangup_cause"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_details"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 3d9248ffe8..5653634786 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -597,12 +597,12 @@ echo "".$text['label-mos']."\n"; $col_count++; } - if (permission_exists('xml_cdr_hangup_cause')) { - echo "".$text['label-hangup_cause']."\n"; + if (permission_exists('xml_cdr_status')) { + echo "".$text['label-status']."\n"; $col_count++; } - else { - echo "".$text['label-status']."\n"; + if (permission_exists('xml_cdr_hangup_cause')) { + echo "".$text['label-hangup_cause']."\n"; $col_count++; } if (permission_exists('xml_cdr_details')) { @@ -806,14 +806,14 @@ } $content .= " ".$value."\n"; } - //hangup cause/call result + //call result/status + if (permission_exists("xml_cdr_status")) { + $content .= " ".ucwords(escape($call_result))."\n"; + } + //hangup cause if (permission_exists('xml_cdr_hangup_cause')) { $content .= " ".escape($hangup_cause)."\n"; } - else { - $content .= " ".ucwords(escape($call_result))."\n"; - } - $content .= "\n"; //show the leg b only to those with the permission if ($row['leg'] == 'a') {