diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 61b25244fe..363f82d74a 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -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++; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 6e5d7e2272..ca4ff9a093 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -649,9 +649,11 @@ require_once "resources/require.php"; echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + if (permission_exists('device_line_password')) { + echo " \n"; + echo " \n"; + echo " \n"; + } echo " \n"; echo " \n"; diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index 3fc41d0336..3f302fcb04 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -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 diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 756e365098..c3547acc49 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -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', "; }