Add permissions for call detail record details. Purpose to hide advanced details from the admin group.
This commit is contained in:
parent
713e79a57d
commit
2be533687d
|
|
@ -5,7 +5,7 @@
|
|||
$apps[$x]['uuid'] = "4a085c51-7635-ff03-f67b-86e834422848";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.1";
|
||||
$apps[$x]['version'] = "1.2";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Call Detail Records with all information about the call.";
|
||||
|
|
@ -192,6 +192,7 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_details";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_b_leg";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
|
@ -222,6 +223,18 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_call_stats";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_channel_data";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_variables";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_application_log";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_extension_summary_all";
|
||||
|
||||
//default settings
|
||||
|
|
|
|||
|
|
@ -593,10 +593,6 @@
|
|||
echo "<th class='right hide-md-dn' title=\"".$text['description-tta']."\">".$text['label-tta']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_duration')) {
|
||||
echo "<th class='center hide-sm-dn'>".$text['label-duration']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_pdd')) {
|
||||
echo "<th class='right hide-md-dn' title=\"".$text['description-pdd']."\">".$text['label-pdd']."</th>\n";
|
||||
$col_count++;
|
||||
|
|
@ -605,6 +601,10 @@
|
|||
echo "<th class='center hide-md-dn' title=\"".$text['description-mos']."\">".$text['label-mos']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_duration')) {
|
||||
echo "<th class='center hide-sm-dn'>".$text['label-duration']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_status')) {
|
||||
echo "<th class='hide-sm-dn shrink'>".$text['label-status']."</th>\n";
|
||||
$col_count++;
|
||||
|
|
@ -841,22 +841,22 @@
|
|||
if (permission_exists('xml_cdr_tta')) {
|
||||
$content .= " <td class='middle right hide-md-dn'>".(!empty($row['tta']) && $row['tta'] >= 0 ? $row['tta']."s" : " ")."</td>\n";
|
||||
}
|
||||
//duration
|
||||
if (permission_exists('xml_cdr_duration')) {
|
||||
$content .= " <td class='middle center hide-sm-dn'>".gmdate("G:i:s", $seconds)."</td>\n";
|
||||
}
|
||||
//pdd (post dial delay)
|
||||
if (permission_exists("xml_cdr_pdd")) {
|
||||
$content .= " <td class='middle right hide-md-dn'>".number_format(escape($row['pdd_ms'])/1000,2)."s</td>\n";
|
||||
}
|
||||
//mos (mean opinion score)
|
||||
if (permission_exists("xml_cdr_mos")) {
|
||||
if(!empty($row['rtp_audio_in_mos'])){
|
||||
if(!empty($row['rtp_audio_in_mos'])) {
|
||||
$title = " title='".$text['label-mos_score-'.round($row['rtp_audio_in_mos'])]."'";
|
||||
$value = $row['rtp_audio_in_mos'];
|
||||
}
|
||||
$content .= " <td class='middle center hide-md-dn' ".($title ?? '').">".($value ?? '')."</td>\n";
|
||||
}
|
||||
//duration
|
||||
if (permission_exists('xml_cdr_duration')) {
|
||||
$content .= " <td class='middle center hide-sm-dn'>".gmdate("G:i:s", $seconds)."</td>\n";
|
||||
}
|
||||
//call result/status
|
||||
if (permission_exists("xml_cdr_status")) {
|
||||
$content .= " <td class='middle no-wrap hide-sm-dn'><a href='".$list_row_url."'>".escape($text['label-'.$status])."</a></td>\n";
|
||||
|
|
|
|||
|
|
@ -311,7 +311,9 @@
|
|||
echo "<th>".$text['label-end']."</th>\n";
|
||||
echo "<th>".$text['label-duration']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-status']."</th>\n";
|
||||
if (permission_exists('xml_cdr_hangup_cause')) {
|
||||
echo "<th>".$text['label-hangup_cause']."</th>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href='xml_cdr_details.php?id=".urlencode($uuid)."'>".escape($direction)."</a></td>\n";
|
||||
|
|
@ -346,7 +348,9 @@
|
|||
echo " <td valign='top' class='".$row_style[$c]."'>".escape(date("Y-m-d H:i:s", (int) $end_epoch))."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape(gmdate("G:i:s", (int)$duration))."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($text['label-'.$status])."</td>\n";
|
||||
if (permission_exists('xml_cdr_hangup_cause')) {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($hangup_cause)."</td>\n";
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
|
@ -390,6 +394,7 @@
|
|||
echo "<br /><br />\n";
|
||||
|
||||
//call stats
|
||||
if (permission_exists('xml_cdr_call_stats')) {
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -446,8 +451,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//channel data loop
|
||||
if (permission_exists('xml_cdr_channel_data')) {
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -476,8 +483,10 @@
|
|||
}
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
||||
//variable loop
|
||||
if (permission_exists('xml_cdr_variables')) {
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -538,8 +547,10 @@
|
|||
}
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
||||
//application log
|
||||
if (permission_exists('xml_cdr_application_log')) {
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -579,8 +590,10 @@
|
|||
}
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
||||
//call flow
|
||||
/*
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
|
@ -786,6 +799,7 @@
|
|||
echo "</table>";
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//get the footer
|
||||
require_once "resources/footer.php";
|
||||
|
|
|
|||
Loading…
Reference in New Issue