mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
ws281x - Update logic to identify is user is admin (#1623)
This commit is contained in:
@@ -159,12 +159,10 @@ QJsonObject LedDeviceWS281x::discover(const QJsonObject& /*params*/)
|
||||
|
||||
QJsonArray deviceList;
|
||||
|
||||
if (SysInfo::isUserAdmin())
|
||||
{
|
||||
//Indicate the general availability of the device, if hyperion is run under root
|
||||
deviceList << QJsonObject ({{"found",true}});
|
||||
devicesDiscovered.insert("devices", deviceList);
|
||||
}
|
||||
//Indicate the general availability of the device, if hyperion is run under root
|
||||
devicesDiscovered.insert("isUserAdmin", SysInfo::isUserAdmin());
|
||||
|
||||
devicesDiscovered.insert("devices", deviceList);
|
||||
|
||||
DebugIf(verbose,_log, "devicesDiscovered: [%s]", QString(QJsonDocument(devicesDiscovered).toJson(QJsonDocument::Compact)).toUtf8().constData());
|
||||
|
||||
|
Reference in New Issue
Block a user