Add a new permission to control whether a user is allowed to enable or disable an extension.
This commit is contained in:
parent
cc51673863
commit
8d6ac2709e
|
|
@ -58,6 +58,10 @@
|
|||
$apps[$x]['permissions'][$y]['name'] = "extension_toll";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_enabled";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "outbound_caller_id_select";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
|
|
|||
|
|
@ -377,7 +377,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
$sql .= "sip_bypass_media, ";
|
||||
$sql .= "dial_string, ";
|
||||
$sql .= "enabled, ";
|
||||
if (permission_exists('extension_enabled')) {
|
||||
$sql .= "enabled, ";
|
||||
}
|
||||
$sql .= "description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
|
|
@ -434,7 +436,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
$sql .= "'$sip_bypass_media', ";
|
||||
$sql .= "'$dial_string', ";
|
||||
$sql .= "'$enabled', ";
|
||||
if (permission_exists('extension_enabled')) {
|
||||
$sql .= "'$enabled', ";
|
||||
}
|
||||
$sql .= "'$description' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
|
|
@ -1638,30 +1642,32 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</tr>\n";
|
||||
//--- end: show_advanced -----------------------
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($enabled == "true" || strlen($enabled) == 0) {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
if (permission_exists('extension_enabled')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($enabled == "true" || strlen($enabled) == 0) {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue