Fix bug where a global profile doesn't show up in the device list (#7103)

* Fix bug where a global profile doesn't show up in the device list
This commit is contained in:
frytimo
2024-08-19 12:50:08 -03:00
committed by GitHub
parent e502f2d9d1
commit 027a78243a

View File

@@ -132,8 +132,11 @@
//get the devices profiles
$sql = "select * from v_device_profiles ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$sql .= "where true ";
if (!permission_exists('device_profile_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $domain_uuid;
}
$device_profiles = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);