mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 02:43:48 +00:00
Add extension_password and device_line_password permissions. Goal is to make it possible to hide the password from the admin as desired by the superadmin.
This commit is contained in:
@@ -71,6 +71,10 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_line_password';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "device_setting_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
@@ -649,9 +649,11 @@ require_once "resources/require.php";
|
||||
echo " <input class='formfld' style='width: 75px;' type='text' name='device_lines[".$x."][auth_id]' maxlength='255' value=\"".$row['auth_id']."\">\n";
|
||||
echo " </td>\n";
|
||||
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 90px;' type='password' name='device_lines[".$x."][password]' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value=\"".$row['password']."\">\n";
|
||||
echo " </td>\n";
|
||||
if (permission_exists('device_line_password')) {
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 90px;' type='password' name='device_lines[".$x."][password]' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value=\"".$row['password']."\">\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 75px;' type='number' name='device_lines[".$x."][sip_port]' maxlength='255' min='0' max='65535' step='1' value=\"".$row['sip_port']."\">\n";
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_dial_string";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_password";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
|
||||
@@ -430,7 +430,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "'$extension_uuid', ";
|
||||
$sql .= "'$extension', ";
|
||||
$sql .= "'$number_alias', ";
|
||||
$sql .= "'$password', ";
|
||||
if (permission_exists('extension_password')) {
|
||||
$sql .= "'$password', ";
|
||||
}
|
||||
if (if_group("superadmin") || (if_group("admin") && $billing_app_exists)) {
|
||||
$sql .= "'$accountcode', ";
|
||||
}
|
||||
@@ -568,7 +570,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
$sql .= "extension = '$extension', ";
|
||||
$sql .= "number_alias = '$number_alias', ";
|
||||
$sql .= "password = '$password', ";
|
||||
if (permission_exists('extension_password')) {
|
||||
$sql .= "password = '$password', ";
|
||||
}
|
||||
if (if_group("superadmin") || (if_group("admin") && $billing_app_exists)) {
|
||||
$sql .= "accountcode = '$accountcode', ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user