diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index cb37522806..72233e7d11 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -674,7 +674,9 @@ //$array["voicemails"][$i]["voicemail_alternate_greet_id"] = $alternate_greet_id; $array["voicemails"][$i]["voicemail_mail_to"] = $voicemail_mail_to; //$array["voicemails"][$i]["voicemail_attach_file"] = $voicemail_attach_file; - $array["voicemails"][$i]["voicemail_file"] = $voicemail_file; + if (permission_exists('voicemail_file')) { + $array["voicemails"][$i]["voicemail_file"] = $voicemail_file; + } if (permission_exists('voicemail_local_after_email')) { $array["voicemails"][$i]["voicemail_local_after_email"] = $voicemail_local_after_email; } @@ -1737,20 +1739,22 @@ echo "\n"; } - echo "\n"; - echo "\n"; - echo " ".$text['label-voicemail_file']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-voicemail_file']."\n"; - echo "\n"; - echo "\n"; + if (permission_exists('voicemail_file')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-voicemail_file']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-voicemail_file']."\n"; + echo "\n"; + echo "\n"; + } if (permission_exists('voicemail_local_after_email')) { echo "\n"; diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 30b129e673..634e7dc5ae 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -76,6 +76,10 @@ $apps[$x]['permissions'][$y]['name'] = "voicemail_import"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "voicemail_file"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_message_view"; $apps[$x]['permissions'][$y]['menu']['uuid'] = "0347f82a-62a0-49d0-bacd-511d080c46d5"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 5217537f75..c6401c92e1 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -155,7 +155,9 @@ $array['voicemails'][0]['voicemail_sms_to'] = $voicemail_sms_to; $array['voicemails'][0]['voicemail_transcription_enabled'] = $voicemail_transcription_enabled; $array['voicemails'][0]['voicemail_tutorial'] = $voicemail_tutorial; - $array['voicemails'][0]['voicemail_file'] = $voicemail_file; + if (permission_exists('voicemail_file')) { + $array['voicemails'][0]['voicemail_file'] = $voicemail_file; + } if (permission_exists('voicemail_local_after_email')) { $array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email; } @@ -667,21 +669,23 @@ echo "\n"; } - echo "\n"; - echo "\n"; - echo " ".$text['label-voicemail_file']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-voicemail_file']."\n"; - echo "\n"; - echo "\n"; + if (permission_exists('voicemail_file')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-voicemail_file']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-voicemail_file']."\n"; + echo "\n"; + echo "\n"; + } if (permission_exists('voicemail_local_after_email')) { echo "\n";