diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 01aca9b27a..4ad4fd8efc 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -109,6 +109,14 @@ $apps[$x]['permissions'][$y]['name'] = "device_line_server_address_secondary"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "device_line_label"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "device_line_display_name"; + $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"; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index eec9127ec2..f8f3b750d7 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -321,8 +321,12 @@ } else if ($new_line && isset($_SESSION['provision']['server_address_secondary'])) { $array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text']; } - $array['devices'][0]['device_lines'][$y]['label'] = $row["label"]; - $array['devices'][0]['device_lines'][$y]['display_name'] = $row["display_name"]; + if (permission_exists('device_line_label')) { + $array['devices'][0]['device_lines'][$y]['label'] = $row["label"]; + } + if (permission_exists('device_line_display_name')) { + $array['devices'][0]['device_lines'][$y]['display_name'] = $row["display_name"]; + } $array['devices'][0]['device_lines'][$y]['user_id'] = $row["user_id"]; if (permission_exists('device_line_auth_id')) { $array['devices'][0]['device_lines'][$y]['auth_id'] = $row["auth_id"]; @@ -989,11 +993,11 @@ width: auto; float: left; } - + .device_image { max-width: 280px; } - + .device_image > img { position: relative; max-height: 170px; @@ -1001,22 +1005,22 @@ transition: transform .6s; z-index: 2; } - + .device_image > img:hover { cursor: zoom-in; - } - + } + .device_image >img:active { transform: scale(3); box-shadow: 0 0 10px #ccc; } "; - + $device_image_path = $current_device_path . "/"; $device_image_name = $current_device . ".jpg"; $device_image_full = $device_image_path . "/" . $current_device . "/" . $device_image_name; - + if (file_exists($device_image_full)) { $device_image = base64_encode(file_get_contents($device_image_full)); @@ -1051,8 +1055,12 @@ if (permission_exists('device_line_outbound_proxy_secondary')) { echo "