Hide things that non-admin users shouldnt edit

This commit is contained in:
Luis Daniel Lucio Quiroz 2020-12-29 00:24:03 -05:00 committed by GitHub
parent bb868a2a8b
commit de021ec34c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 122 additions and 108 deletions

View File

@ -405,12 +405,16 @@
if (permission_exists("emergency_caller_id_number")) {
$array["extensions"][$i]["emergency_caller_id_number"] = $emergency_caller_id_number;
}
if (permission_exists("extension_directory")) {
$array["extensions"][$i]["directory_first_name"] = $directory_first_name;
$array["extensions"][$i]["directory_last_name"] = $directory_last_name;
$array["extensions"][$i]["directory_visible"] = $directory_visible;
$array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
}
if (permission_exists("extension_limit")) {
$array["extensions"][$i]["limit_max"] = $limit_max;
$array["extensions"][$i]["limit_destination"] = $limit_destination;
}
if (permission_exists("extension_user_context")) {
$array["extensions"][$i]["user_context"] = $user_context;
}
@ -429,12 +433,16 @@
if (strlen($call_timeout) > 0) {
$array["extensions"][$i]["call_timeout"] = $call_timeout;
}
if (permission_exists("extension_call_group")) {
$array["extensions"][$i]["call_group"] = $call_group;
}
$array["extensions"][$i]["call_screen_enabled"] = $call_screen_enabled;
if (permission_exists('extension_user_record')) {
$array["extensions"][$i]["user_record"] = $user_record;
}
if (permission_exists('extension_hold_music')) {
$array["extensions"][$i]["hold_music"] = $hold_music;
}
$array["extensions"][$i]["auth_acl"] = $auth_acl;
if (permission_exists("extension_cidr")) {
$array["extensions"][$i]["cidr"] = $cidr;
@ -1468,6 +1476,7 @@
echo "</tr>\n";
}
if (permission_exists("extension_directory")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_full_name']."\n";
@ -1529,7 +1538,9 @@
echo $text['description-directory_exten_visible']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists("extension_limit")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-limit_max']."\n";
@ -1551,6 +1562,7 @@
echo $text['description-limit_destination']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('voicemail_edit') && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
echo "<tr>\n";
@ -1679,6 +1691,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists("extension_call_group")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-call_group']."\n";
@ -1703,6 +1716,7 @@
echo $text['description-call_group']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('extension_call_screen')) {
echo "<tr>\n";
@ -1769,7 +1783,7 @@
echo "</tr>\n";
}
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold') && permission_exists('extension_hold_music')) {
echo "<tr>\n";
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-hold_music']."\n";