Fixed mobile app.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-04 11:38:47 -07:00
parent c860125a9d
commit 767fae71fc
4 changed files with 18 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -492,6 +492,22 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
// Return the mesh for this device, in some cases, we may auto-create the mesh.
function getMeshAutoCreate() {
var mesh = parent.meshes[obj.dbMeshKey];
// If the mesh was not found and we are in LAN mode, check of the domain can be corrected
if ((args.lanonly == true) && (mesh == null)) {
var smesh = obj.dbMeshKey.split('/');
for (var i in parent.parent.config.domains) {
mesh = parent.meshes['mesh/' + i + '/' + smesh[2]];
if (mesh != null) {
obj.domain = domain = parent.parent.config.domains[i];
obj.meshid = smesh[2];
obj.dbMeshKey = 'mesh/' + i + '/' + smesh[2];
obj.dbNodeKey = 'node/' + domain.id + '/' + obj.nodeid;
break;
}
}
}
if ((mesh == null) && (typeof domain.orphanagentuser == 'string')) {
const adminUser = parent.users['user/' + domain.id + '/' + domain.orphanagentuser.toLowerCase()];
if ((adminUser != null) && (adminUser.siteadmin == 0xFFFFFFFF)) {

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.1-q",
"version": "0.4.1-r",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -2259,9 +2259,9 @@
(deskState == 0) &&
(meshrights & 8) &&
((mesh.mtype == 1) ||
(currentNode.intelamt != null) &&
((currentNode.intelamt.state == 2) &&
(currentNode.intelamt.ver != null) &&
(currentNode.intelamt != null) &&
(typeof currentNode.intelamt.sku == 'number') &&
((currentNode.intelamt.sku & 8) != 0))
)