Use contact permissions for the fax contacts if value is true.

This commit is contained in:
FusionPBX 2022-02-18 14:08:14 -07:00 committed by GitHub
parent 39bd197437
commit bbf61c3950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 21 deletions

View File

@ -943,6 +943,7 @@ if (!$included) {
$sql .= "and cp.phone_type_fax = 1 ";
$sql .= "and cp.phone_number is not null ";
$sql .= "and cp.phone_number <> '' ";
if ($_SESSION['contact']['permissions']['boolean'] == "true") {
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
//only show contacts assigned to current user's group(s) and those not assigned to any group
$sql .= "and (";
@ -966,6 +967,7 @@ if (!$included) {
$sql .= " ) ";
$sql .= ") ";
}
}
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$contacts = $database->select($sql, $parameters, 'all');