diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php index b9b149b954..33934c39dd 100644 --- a/app/calls/call_edit.php +++ b/app/calls/call_edit.php @@ -63,7 +63,7 @@ else { $sql = "select * from v_extensions "; $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and extension_uuid = '$extension_uuid' "; - if (!(if_group("admin") || if_group("superadmin"))) { + if (!(permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb'))) { if (count($_SESSION['user']['extension']) > 0) { $sql .= "and ("; $x = 0; diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php index 623a832287..865c66353a 100644 --- a/app/voicemail_greetings/voicemail_greetings.php +++ b/app/voicemail_greetings/voicemail_greetings.php @@ -46,7 +46,7 @@ require_once "resources/check_auth.php"; } //deny access if the user extension is not assigned - if (!(if_group("superadmin") || if_group("admin"))) { + if (!permission_exists('voicemail_greeting_view')) { if (!is_extension_assigned($voicemail_id)) { echo "access denied"; return;