Add xml_cdr_call_log permission

This commit is contained in:
FusionPBX
2025-05-02 10:44:13 -06:00
committed by GitHub
parent 7ff882f551
commit 54da8c7ff1
2 changed files with 5 additions and 2 deletions

View File

@@ -247,6 +247,9 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_call_log';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_call_stats";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;

View File

@@ -175,7 +175,7 @@
}
//get the cdr log from the database
if ($call_log_enabled) {
if (permission_exists('xml_cdr_call_log') && $call_log_enabled) {
$sql = "select * from v_xml_cdr_logs ";
if (permission_exists('xml_cdr_all')) {
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
@@ -384,7 +384,7 @@
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$text['title2']."</b><br><br></td>\n";
echo "<td width='70%' align='right' valign='top'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'link'=>'xml_cdr.php'.(!empty($_SESSION['xml_cdr']['last_query']) ? '?'.urlencode($_SESSION['xml_cdr']['last_query']) : null)]);
if ($call_log_enabled && isset($log_content) && !empty($log_content)) {
if (permission_exists('xml_cdr_call_log') && $call_log_enabled && isset($log_content) && !empty($log_content)) {
echo button::create(['type'=>'button','label'=>$text['button-call_log'],'icon'=>$settings->get('theme', 'button_icon_search'),'style'=>'margin-left: 15px;','link'=>'xml_cdr_log.php?id='.$uuid]);
}
if ($transcribe_enabled && !empty($transcribe_engine) && empty($record_transcription)) {