Update device_dashboard.php

Protect keys with the device profile from being edited by a user in the device dashboard.
This commit is contained in:
FusionPBX 2016-08-08 16:58:32 -06:00 committed by GitHub
parent 3364d692ee
commit 4bcbf09194
1 changed files with 8 additions and 0 deletions

View File

@ -121,6 +121,10 @@
if (!$device_key_authorized) {
$protected_keys[$row['device_key_id']] = 'true';
}
//add to protected
if ($row['device_key_protected'] == "true") {
$protected_keys[$row['device_key_id']] = 'true';
}
}
//create a list of protected keys - device proile keys
foreach($device_profile_keys as $row) {
@ -409,6 +413,10 @@
if (!$device_key_authorized) {
unset($device_keys[$row['device_key_id']]);
}
//hide protected keys
if ($row['device_key_protected'] == "true") {
unset($device_keys[$row['device_key_id']]);
}
}
//show the header