mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
- Update call block permissions
The call_block_all permission was pulling double duty. - Changed the code to use call_block_all only for SHOW ALL to call block across all domains. - Permission call_block_extension will be used instead for the purpose of showing the extension list. - If someone doesn't call_block_permission then their assigned extensions will be use with each call block item they add.
This commit is contained in:
@@ -103,8 +103,7 @@
|
||||
$sql = "select count(*) from view_call_block ";
|
||||
$sql .= "where true ";
|
||||
if ($show == "all" && permission_exists('call_block_all')) {
|
||||
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
//show all records across all domains
|
||||
}
|
||||
else {
|
||||
$sql .= "and ( ";
|
||||
@@ -115,7 +114,7 @@
|
||||
$sql .= ") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
|
||||
if (!permission_exists('call_block_extension') && !empty($_SESSION['user']['extension'])) {
|
||||
$sql .= "and extension_uuid in (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $field) {
|
||||
@@ -181,7 +180,7 @@
|
||||
$sql .= ") ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
if (!permission_exists('call_block_extension') && !empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
$sql .= "and extension_uuid in (";
|
||||
$x = 0;
|
||||
foreach ($_SESSION['user']['extension'] as $field) {
|
||||
@@ -403,4 +402,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user