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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

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);