diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index fea94e1966..23707ebf44 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -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++; diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 6154fbec54..294c9a4ffd 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -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 "".$text['title2']."

\n"; echo "\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)) {