[device profiles] Only allow editing device settings when having permission (#5980)

* [device profiles] Only allow editing device settings when having permission

* Update device_profile_edit.php
This commit is contained in:
agree 2021-11-13 13:29:21 -05:00 committed by GitHub
parent f9e2267e99
commit dbd1fc27fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 65 additions and 61 deletions

View File

@ -161,6 +161,7 @@
}
}
$y = 0;
if (permission_exists("device_profile_setting_edit")) {
foreach ($device_profile_settings as $row) {
if (strlen($row['profile_setting_name']) > 0 && strlen($row['profile_setting_enabled']) > 0) {
$array['device_profiles'][0]['device_profile_settings'][$y]["domain_uuid"] = $domain_uuid;
@ -172,6 +173,7 @@
$y++;
}
}
}
//save to the data
$database = new database;
@ -629,6 +631,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('device_profile_setting_edit')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_profile_settings']."\n";
@ -687,6 +690,7 @@
echo $text['description-profile_setting_description']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('device_profile_domain')) {
echo "<tr>\n";