From ecf3dc1cc883f7dfb3752023b629628d40390856 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 18 Aug 2020 14:44:42 -0700 Subject: [PATCH] Added allDevGroupManagers for server console info command. --- agents/hashagents.txt | 32 ++++++++++++++++---------------- meshcentral.js | 4 +++- meshuser.js | 2 +- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/agents/hashagents.txt b/agents/hashagents.txt index 089843db..8cadfc0f 100644 --- a/agents/hashagents.txt +++ b/agents/hashagents.txt @@ -1,33 +1,33 @@ 3: MeshService-signed.exe -C04FA82B33290FE52C732165834EA4B5491E6982A2671C0FF51DB447CA50434CC38515AA15D40D20C105CF2C13BA9D02 +082A1BF9314EE9774A0711940CF695D7E5F76D17A72E090F57488970189F3C86E6A2DE24421F99D7DA8E31346368C090 4: MeshService64-signed.exe -45A86F19CCE1BE657A37AA4D2E2F10DED27337EA34FA6195DBAAF9CAF642195FC8059684E20DDC92CDFB56C60C3BD8C3 +8B576391D4FE974599A94C804BCF2DB9625B639EB71A1CCF92811A770F4BE30EA6A3345C979A784E37A73EE55DBB672D 5: meshagent_x86 -3EA390454CE039823B735D61EEF5A5BC39AD656BE156BC3C3E818DF2BB3F1442CDC0146A222E7C37F14D23CAF070AECE +C2BF5E135A47BC437A8BB0ED373743AECF165B17C9BA27809F7AF86A493E5EA2573E8B8A2B84510889DBDA554DA2D7E7 6: meshagent_x86-64 -64FD1D49A16017F8C86EB0054236427E3AEC3B31BD35EAF8B372ADF451F284142360480B325A2CC203CFA95B069211ED +DC94D997D41C3A30F7963FE45A52F6DF9561C11C263FE20D9972D1532C33056884A91CD14C4D3B548ACBCA8D6EF3D344 9: meshagent_arm -25DDBBB570AA5F0EC1E7CDF10D35299089BB32785CE530139544AF04350390C7029A104DE840E98D719B4B1905ECE749 +10721EED76F77869F24890C6CAD8898E7887D971F5AFE5A2578EBA38C52EB88980A334BD736FA2785A67FA6D56325F00 7: meshagent_mips -7A9C9E622DAEC35013724A8A92D8BC5D944EA18E530A9E89A7E9B2719D112577B6CF3932560A1B64382E1129BEDE64E7 +80451B938473F13A6A0C9A6A7F73F043433809B491533BC4E34A75FBB8E75009FEB12E74602F2FE19358FF496AED4AE5 13: meshagent_pogo -1D4B5C066F249B9863A3194C72FD24F279AD7564968106EEE28A850B30AFD9AD04117133802C72E13194B8E4B2DACE41 +36A1F02F5DD294A07DD910DBA6BC93C4B8B4A77BBCC21458A8D547411B09628FE6C305796C0CB0EE5B20E1630699CFC4 15: meshagent_poky -B040D93B61F95D720A71C69747FFAB879DC786575E6D6E07A66CAE5A773A3DE1CD8D5EED1F616D412695A881C43C1719 +F3479CBFF16AEEA696AB457277227881021756015FEE42201E4C5578FA2B22A47DF4C25057AFDC8BB3C7B6358C257E90 16: meshagent_osx-x86-64 -FFB730DA93DBE85C719DE5794522DB482968FEF3B6546312BD65749C5C142A8448BCD79F28FBDAA9FD33514F2EADFF39 +1110AAABA75F1F427738DB54FAE36BD85DBE9370A8D2DB77EC71FBEA68B34ADDBDF35E506070A4FD38A48F962AC47D99 18: meshagent_poky64 -0F6FE1230143B663BEB8C18450184CF13C12B4865A64083A399003D6B17AAA1F47745BF93380382712D2F7B14D7BFDCE +A9811A22104881777C9F7E06163164054673B0B71F2F26354AC96BCB316426D6EDA320090182C6DAA334146A68C082B0 19: meshagent_x86_nokvm -A42ED063D34469B272DB09BA28E8B1E3DAABA4468994CB4E83CF5B625D08D3F6676EBF39A8AE3C2E5EAAC010EEEE79A7 +D119898705C9D7E6EB9C7C7ED84EC5EC48CD391D0AF913D1190DAE2A478228D77D5F488FB3638A8FA030A6AB7E0690C9 20: meshagent_x86-64_nokvm -2CB7E07B7522CE54F6791AD923EFA81C93CDADE0F77BAD9EC5DA1FB362ED7DD79FF522CA38DC23242853235903C054F7 +7663D8FA33011111ABC14DEE0DAC666B6D3BD691DF4448A8A2E3A01DF620E607DAF8917CAA7F99B219790F6009167662 24: meshagent_arm-linaro -D270E2C42B65B20DA8487C63120D3B02CCA916FF35220C4B1623A33D02EC70411A4DB808F97A5159AB4E9985387B3821 +E02F6948F634E9988F55A955AC583870263ED18E4C81765D55FCA1F8B8EB1BD01A8AF4F363EE40B6A7782B3FED138184 25: meshagent_armhf -DCFF6BED2AB4E3290274C7B1D2F5984CC7E4FA3D6E5B063C839E6D1D67648CB74A7324C52C0413C99C37F86EA381E08A +BC32FC69A798585C7458BF027E571E85B865D3BDA7CBB7BD860AF75B5AB014EA0988C9E2137A5BF8CAF8049924E311D3 26: meshagent_arm64 -CC1E9B31DDB1474A01D145A856E6F0CE52072939D5AB8BF921BF8572AF4F7CF08B59AF8C095CFDC86A1887F225ABD42C +144C4A267A51B1E283FFC83D09AF008158166A48E7279B9335B5E5F49BC577FFCA989A4CB96013CFBC0127FB8FF973F0 30: meshagent_freebsd_x86-64 -40868E8C42A9E429B79A9D0C572686221A222E3188A09DE8FF730A7538A0A2CE85B71BEA940EAAC9AA3415F1677CCCC0 +6A5BDC9B325FFB400FD9474F7323DB528F4136F6ED991A86F3AE02BBE435087915BB7358851F05EF3310C089771C95A5 diff --git a/meshcentral.js b/meshcentral.js index fc613486..83a56b41 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1427,11 +1427,13 @@ function CreateMeshCentralServer(config, args) { if (Array.isArray(obj.config.domains[i].managealldevicegroups)) { for (var j in obj.config.domains[i].managealldevicegroups) { if (typeof obj.config.domains[i].managealldevicegroups[j] == 'string') { - obj.config.settings.managealldevicegroups.push('user/' + i + '/' + obj.config.domains[i].managealldevicegroups[j]); + const u = 'user/' + i + '/' + obj.config.domains[i].managealldevicegroups[j]; + if (obj.config.settings.managealldevicegroups.indexOf(u) == -1) { obj.config.settings.managealldevicegroups.push(u); } } } } } + obj.config.settings.managealldevicegroups.sort(); // Start watchdog timer if needed // This is used to monitor if NodeJS is servicing IO correctly or getting held up a lot. Add this line to the settings section of config.json diff --git a/meshuser.js b/meshuser.js index 11d1a411..ebcbc479 100644 --- a/meshuser.js +++ b/meshuser.js @@ -1030,7 +1030,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use try { info.warnings = parent.parent.getServerWarnings(); } catch (ex) { } try { info.database = ["Unknown", "NeDB", "MongoJS", "MongoDB", "MariaDB", "MySQL"][parent.parent.db.databaseType]; } catch (ex) { } try { info.productionMode = ((process.env.NODE_ENV != null) && (process.env.NODE_ENV == 'production')); } catch (ex) { } - + try { info.allDevGroupManagers = parent.parent.config.settings.managealldevicegroups; } catch (ex) { } r = JSON.stringify(info, null, 4); break; }