If you don't have xml_cdr_lose_race permission then hide the call.

This commit is contained in:
FusionPBX 2020-06-01 16:13:40 -06:00 committed by GitHub
parent 11178787a6
commit 87a7073889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -954,6 +954,9 @@ if (!class_exists('xml_cdr')) {
$sql .= "filter ( \n";
$sql .= " where c.extension_uuid = e.extension_uuid \n";
$sql .= " and missed_call = true \n";
if (!permission_exists('xml_cdr_lose_race')) {
$sql .= " and hangup_cause <> 'LOSE_RACE' \n";
}
if ($this->include_internal) {
$sql .= " and (direction = 'inbound' or direction = 'local') ";
} else {
@ -1007,6 +1010,9 @@ if (!class_exists('xml_cdr')) {
$sql .= "count(*) \n";
$sql .= "filter ( \n";
$sql .= " where c.extension_uuid = e.extension_uuid \n";
if (!permission_exists('xml_cdr_lose_race')) {
$sql .= " and hangup_cause <> 'LOSE_RACE' \n";
}
if ($this->include_internal) {
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
}