Fixed ManageAllDeviceGroups

This commit is contained in:
Ylian Saint-Hilaire 2020-05-28 17:33:25 -07:00
parent 6ea8e3b277
commit 1d6c93f3c3
1 changed files with 2 additions and 1 deletions

View File

@ -1434,7 +1434,8 @@ function CreateMeshCentralServer(config, args) {
else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; }
// Setup users that can see all device groups
obj.config.settings.managealldevicegroups = [];
if (typeof obj.config.settings.managealldevicegroups == 'string') { obj.config.settings.managealldevicegroups = obj.config.settings.managealldevicegroups.split(','); }
else if (Array.isArray(obj.config.settings.managealldevicegroups) == false) { obj.config.settings.managealldevicegroups = []; }
for (i in obj.config.domains) {
if (Array.isArray(obj.config.domains[i].managealldevicegroups)) {
for (var j in obj.config.domains[i].managealldevicegroups) {