diff --git a/meshuser.js b/meshuser.js index 9679959a..3e0ceda9 100644 --- a/meshuser.js +++ b/meshuser.js @@ -396,19 +396,16 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (args.notls == true) { serverinfo.https = false; } else { serverinfo.https = true; serverinfo.redirport = args.redirport; } if (typeof domain.userconsentflags == 'number') { serverinfo.consent = domain.userconsentflags; } if ((typeof domain.usersessionidletimeout == 'number') && (domain.usersessionidletimeout > 0)) { serverinfo.timeout = (domain.usersessionidletimeout * 60 * 1000); } + if (user.siteadmin == 0xFFFFFFFF) { + if (parent.parent.config.settings.managealldevicegroups.indexOf(user._id) >= 0) { serverinfo.manageAllDeviceGroups = true; } + if (obj.crossDomain === true) { serverinfo.crossDomain = []; for (var i in parent.parent.config.domains) { serverinfo.crossDomain.push(i); } } + } // Send server information try { ws.send(JSON.stringify({ action: 'serverinfo', serverinfo: serverinfo })); } catch (ex) { } // Send user information to web socket, this is the first thing we send - try { - var xuserinfo = parent.CloneSafeUser(parent.users[user._id]); - if (user.siteadmin == 0xFFFFFFFF) { - if (parent.parent.config.settings.managealldevicegroups.indexOf(user._id) >= 0) { xuserinfo.manageAllDeviceGroups = true; } - if (obj.crossDomain === true) { xuserinfo.crossDomain = []; for (var i in parent.parent.config.domains) { xuserinfo.crossDomain.push(i); } } - } - ws.send(JSON.stringify({ action: 'userinfo', userinfo: xuserinfo })); - } catch (ex) { } + try { ws.send(JSON.stringify({ action: 'userinfo', userinfo: parent.CloneSafeUser(parent.users[user._id]) })); } catch (ex) { } if (user.siteadmin == 0xFFFFFFFF) { // Send server tracing information @@ -1832,7 +1829,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } case 'usergroups': { - // TODO: Return only groups in the same administrative domain? + // Return only groups in the same administrative domain if ((user.siteadmin & SITERIGHT_USERGROUPS) == 0) { // We are not user group administrator, return a list with limited data for our domain. var groups = {}, groupCount = 0; @@ -1841,35 +1838,44 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } else { // We are user group administrator, return a full user group list for our domain. var groups = {}, groupCount = 0; - for (var i in parent.userGroups) { if (parent.userGroups[i].domain == domain.id) { groupCount++; groups[i] = parent.userGroups[i]; } } + for (var i in parent.userGroups) { if ((obj.crossDomain == true) || (parent.userGroups[i].domain == domain.id)) { groupCount++; groups[i] = parent.userGroups[i]; } } try { ws.send(JSON.stringify({ action: 'usergroups', ugroups: groupCount ? groups : null, tag: command.tag })); } catch (ex) { } } break; } case 'createusergroup': { - var err = null; + var ugrpdomain, err = null; try { // Check if we have new group restriction - if ((user.siteadmin & SITERIGHT_USERGROUPS) == 0) { err = 'Permission denied'; } + if ((user.siteadmin & SITERIGHT_USERGROUPS) == 0) { err = "Permission denied"; } - // In some situations, we need a verified email address to create a device group. - else if ((parent.parent.mailserver != null) && (domain.auth != 'sspi') && (domain.auth != 'ldap') && (user.emailVerified !== true) && (user.siteadmin != 0xFFFFFFFF)) { err = 'Email verification required'; } // User must verify it's email first. - - // Create user group - else if (common.validateString(command.name, 1, 64) == false) { err = 'Invalid group name'; } // User group name is between 1 and 64 characters - else if ((command.desc != null) && (common.validateString(command.desc, 0, 1024) == false)) { err = 'Invalid group description'; } // User group description is between 0 and 1024 characters + // Create user group validation + else if (common.validateString(command.name, 1, 64) == false) { err = "Invalid group name"; } // User group name is between 1 and 64 characters + else if ((command.desc != null) && (common.validateString(command.desc, 0, 1024) == false)) { err = "Invalid group description"; } // User group description is between 0 and 1024 characters // If we are cloning from an existing user group, check that. if (command.clone) { - if (common.validateString(command.clone, 1, 256) == false) { err = 'Invalid clone groupid'; } + if (common.validateString(command.clone, 1, 256) == false) { err = "Invalid clone groupid"; } else { var clonesplit = command.clone.split('/'); - if ((clonesplit.length != 3) || (clonesplit[0] != 'ugrp') || (clonesplit[1] != domain.id)) { err = 'Invalid clone groupid'; } - else if (parent.userGroups[command.clone] == null) { err = 'Invalid clone groupid'; } + if ((clonesplit.length != 3) || (clonesplit[0] != 'ugrp') || ((command.domain == null) && (clonesplit[1] != domain.id))) { err = "Invalid clone groupid"; } + else if (parent.userGroups[command.clone] == null) { err = "Invalid clone groupid"; } } + + // Get new user group domain + ugrpdomain = parent.parent.config.domains[clonesplit[1]]; + if (ugrpdomain == null) { err = "Invalid domain"; } + } else { + // Get new user group domain + ugrpdomain = domain; + if ((obj.crossDomain === true) && (command.domain != null)) { ugrpdomain = parent.parent.config.domains[command.domain]; } + if (ugrpdomain == null) { err = "Invalid domain"; } } - } catch (ex) { err = 'Validation exception: ' + ex; } + + // In some situations, we need a verified email address to create a device group. + if ((err == null) && (parent.parent.mailserver != null) && (ugrpdomain.auth != 'sspi') && (ugrpdomain.auth != 'ldap') && (user.emailVerified !== true) && (user.siteadmin != 0xFFFFFFFF)) { err = "Email verification required"; } // User must verify it's email first. + } catch (ex) { err = "Validation exception: " + ex; } // Handle any errors if (err != null) { @@ -1880,10 +1886,10 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // We only create Agent-less Intel AMT mesh (Type1), or Agent mesh (Type2) parent.crypto.randomBytes(48, function (err, buf) { // Create new device group identifier - var ugrpid = 'ugrp/' + domain.id + '/' + buf.toString('base64').replace(/\+/g, '@').replace(/\//g, '$'); + var ugrpid = 'ugrp/' + ugrpdomain.id + '/' + buf.toString('base64').replace(/\+/g, '@').replace(/\//g, '$'); // Create the new device group - var ugrp = { type: 'ugrp', _id: ugrpid, name: command.name, desc: command.desc, domain: domain.id, links: {} }; + var ugrp = { type: 'ugrp', _id: ugrpid, name: command.name, desc: command.desc, domain: ugrpdomain.id, links: {} }; // Clone the existing group if required var pendingDispatchEvents = []; @@ -1901,7 +1907,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify user change var targets = ['*', 'server-users', user._id, xuser._id]; - var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(xuser), action: 'accountchange', msg: 'User group membership changed: ' + xuser.name, domain: domain.id }; + var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(xuser), action: 'accountchange', msg: 'User group membership changed: ' + xuser.name, domain: ugrpdomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. //parent.parent.DispatchEvent(targets, obj, event); pendingDispatchEvents.push([targets, obj, event]); @@ -1914,7 +1920,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use db.Set(xmesh); // Notify mesh change - var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Added group ' + ugrp.name + ' to mesh ' + xmesh.name, domain: domain.id, invite: mesh.invite }; + var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Added group ' + ugrp.name + ' to mesh ' + xmesh.name, domain: ugrpdomain.id, invite: mesh.invite }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the mesh. Another event will come. //parent.parent.DispatchEvent(['*', xmesh._id, user._id], obj, event); pendingDispatchEvents.push([parent.CreateMeshDispatchTargets(xmesh, [user._id]), obj, event]); @@ -1929,7 +1935,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (db.changeStream == false) { parent.userGroups[ugrpid] = ugrp; } // Event the device group creation - var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: ugrpid, name: ugrp.name, desc: ugrp.desc, action: 'createusergroup', links: ugrp.links, msg: 'User group created: ' + ugrp.name, domain: domain.id }; + var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: ugrpid, name: ugrp.name, desc: ugrp.desc, action: 'createusergroup', links: ugrp.links, msg: 'User group created: ' + ugrp.name, ugrpdomain: domain.id }; parent.parent.DispatchEvent(['*', ugrpid, user._id], obj, event); // Even if DB change stream is active, this event must be acted upon. // Event any pending events, these must be sent out after the group creation event is displatched. @@ -1949,7 +1955,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Change the name or description of a user group if (common.validateString(command.ugrpid, 1, 1024) == false) break; // Check the user group id var ugroupidsplit = command.ugrpid.split('/'); - if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || (ugroupidsplit[1] != domain.id)) break; + if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || ((obj.crossDomain !== true) && (ugroupidsplit[1] != domain.id))) break; + + // Get the domain + var delGroupDomain = parent.parent.config.domains[ugroupidsplit[1]]; + if (delGroupDomain == null) break; db.Get(command.ugrpid, function (err, groups) { if ((err != null) || (groups.length != 1)) return; @@ -1967,7 +1977,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify user change var targets = ['*', 'server-users', user._id, xuser._id]; - var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(xuser), action: 'accountchange', msg: 'User group membership changed: ' + xuser.name, domain: domain.id }; + var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(xuser), action: 'accountchange', msg: 'User group membership changed: ' + xuser.name, delGroupDomain: domain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. parent.parent.DispatchEvent(targets, obj, event); } @@ -1978,7 +1988,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use db.Set(xmesh); // Notify mesh change - var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Removed group ' + group.name + ' from mesh ' + xmesh.name, domain: domain.id, invite: mesh.invite }; + var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Removed group ' + group.name + ' from mesh ' + xmesh.name, domain: delGroupDomain.id, invite: mesh.invite }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the mesh. Another event will come. parent.parent.DispatchEvent(parent.CreateMeshDispatchTargets(xmesh, [user._id]), obj, event); } @@ -1991,7 +2001,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (db.changeStream == false) { delete parent.userGroups[group._id]; } // Event the user group being removed - var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, action: 'deleteusergroup', msg: change, domain: domain.id }; + var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, action: 'deleteusergroup', msg: change, domain: delGroupDomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the mesh. Another event will come. parent.parent.DispatchEvent(['*', group._id, user._id], obj, event); @@ -2032,10 +2042,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use else if (common.validateStrArray(command.usernames, 1, 64) == false) { err = 'Invalid usernames'; } // Username is between 1 and 64 characters else { var ugroupidsplit = command.ugrpid.split('/'); - if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || (ugroupidsplit[1] != domain.id)) { err = 'Invalid groupid'; } + if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || ((obj.crossDomain !== true) && (ugroupidsplit[1] != domain.id))) { err = 'Invalid groupid'; } } } catch (ex) { err = 'Validation exception: ' + ex; } + // Fetch the domain + var addUserDomain = domain; + if (obj.crossDomain === true) { addUserDomain = parent.parent.config.domains[ugroupidsplit[1]]; } + if (addUserDomain == null) { err = 'Invalid domain'; } + // Handle any errors if (err != null) { if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'addusertousergroup', responseid: command.responseid, result: err })); } catch (ex) { } } @@ -2050,7 +2065,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use var unknownUsers = [], addedCount = 0, failCount = 0; for (var i in command.usernames) { // Check if the user exists - var chguserid = 'user/' + domain.id + '/' + command.usernames[i].toLowerCase(), chguser = parent.users[chguserid]; + var chguserid = 'user/' + addUserDomain.id + '/' + command.usernames[i].toLowerCase(), chguser = parent.users[chguserid]; if (chguser != null) { // Add mesh to user if (chguser.links == null) { chguser.links = {}; } @@ -2060,7 +2075,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify user change var targets = ['*', 'server-users', user._id, chguser._id]; - var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(chguser), action: 'accountchange', msg: 'User group membership changed: ' + chguser.name, domain: domain.id }; + var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(chguser), action: 'accountchange', msg: 'User group membership changed: ' + chguser.name, domain: addUserDomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. parent.parent.DispatchEvent(targets, obj, event); @@ -2078,7 +2093,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use db.Set(group); // Notify user group change - var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, name: group.name, desc: group.desc, action: 'usergroupchange', links: group.links, msg: 'Added user ' + chguser.name + ' to user group ' + group.name, domain: domain.id }; + var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, name: group.name, desc: group.desc, action: 'usergroupchange', links: group.links, msg: 'Added user ' + chguser.name + ' to user group ' + group.name, addUserDomain: domain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user group. Another event will come. parent.parent.DispatchEvent(['*', group._id, user._id, chguserid], obj, event); } @@ -2102,10 +2117,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use else if (common.validateString(command.userid, 1, 256) == false) { err = 'Invalid userid'; } else { var ugroupidsplit = command.ugrpid.split('/'); - if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || (ugroupidsplit[1] != domain.id)) { err = 'Invalid groupid'; } + if ((ugroupidsplit.length != 3) || (ugroupidsplit[0] != 'ugrp') || ((obj.crossDomain !== true) && (ugroupidsplit[1] != domain.id))) { err = 'Invalid groupid'; } } } catch (ex) { err = 'Validation exception: ' + ex; } + // Fetch the domain + var removeUserDomain = domain; + if (obj.crossDomain !== true) { removeUserDomain = parent.parent.config.domains[ugroupidsplit[1]]; } + if (removeUserDomain == null) { err = 'Invalid domain'; } + // Handle any errors if (err != null) { if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'removeuserfromusergroup', responseid: command.responseid, result: err })); } catch (ex) { } } @@ -2122,7 +2142,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify user change var targets = ['*', 'server-users', user._id, chguser._id]; - var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(chguser), action: 'accountchange', msg: 'User group membership changed: ' + chguser.name, domain: domain.id }; + var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(chguser), action: 'accountchange', msg: 'User group membership changed: ' + chguser.name, domain: removeUserDomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. parent.parent.DispatchEvent(targets, obj, event); @@ -2141,7 +2161,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify user group change if (change) { - var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, name: group.name, desc: group.desc, action: 'usergroupchange', links: group.links, msg: 'Removed user ' + chguser.name + ' from user group ' + group.name, domain: domain.id }; + var event = { etype: 'ugrp', userid: user._id, username: user.name, ugrpid: group._id, name: group.name, desc: group.desc, action: 'usergroupchange', links: group.links, msg: 'Removed user ' + chguser.name + ' from user group ' + group.name, domain: removeUserDomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user group. Another event will come. parent.parent.DispatchEvent(['*', group._id, user._id, chguser._id], obj, event); } @@ -2593,7 +2613,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } case 'addmeshuser': { - var err = null; + var err = null, mesh, meshIdSplit; if (typeof command.userid == 'string') { command.userids = [command.userid]; } // Resolve the device group name if needed @@ -2614,9 +2634,10 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use else { if (command.meshid.indexOf('/') == -1) { command.meshid = 'mesh/' + domain.id + '/' + command.meshid; } mesh = parent.meshes[command.meshid]; + meshIdSplit = command.meshid.split('/'); if (mesh == null) { err = 'Unknown group'; } else if (((selfMeshRights = parent.GetMeshRights(user, mesh)) & MESHRIGHT_MANAGEUSERS) == 0) { err = 'Permission denied'; } - else if ((command.meshid.split('/').length != 3) || (command.meshid.split('/')[1] != domain.id)) { err = 'Invalid domain'; } // Invalid domain, operation only valid for current domain + else if ((meshIdSplit.length != 3) || (meshIdSplit[1] != domain.id)) { err = 'Invalid domain'; } // Invalid domain, operation only valid for current domain } } catch (ex) { err = 'Validation exception: ' + ex; } @@ -2644,6 +2665,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use for (var i in parent.users) { if (i.endsWith(search) && (parent.users[i].domain == domain.id)) { newuser = parent.users[i]; command.userids[i] = newuserid = parent.users[i]._id; break; } } } + // Make sure this user is in the same domain as the device group + if (meshIdSplit[1] != newuserid.split('/')[1]) { msgs.push("Mismatch domains"); continue; } + if (newuser != null) { // Can't add or modify self if (newuserid == obj.user._id) { msgs.push("Can't change self"); continue; } @@ -2719,7 +2743,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } case 'adddeviceuser': { if (typeof command.userid == 'string') { command.userids = [command.userid]; } - var err = null; + var err = null, nodeIdSplit; try { if (common.validateString(command.nodeid, 1, 1024) == false) { err = 'Invalid nodeid'; } // Check the nodeid else if (common.validateInt(command.rights) == false) { err = 'Invalid rights'; } // Device rights must be an integer @@ -2772,6 +2796,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } } + // Check the the user and device are in the same domain + if (command.nodeid.split('/')[1] != newuserid.split('/')[1]) return; // Domain mismatch + if (newuser != null) { // Add this user to the dispatch target list dispatchTargets.push(newuser._id); @@ -2840,7 +2867,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } case 'removemeshuser': { - var err = null; + var xdomain, err = null; // Resolve the device group name if needed if ((typeof command.meshname == 'string') && (command.meshid == null)) { @@ -2857,19 +2884,26 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (common.validateString(command.meshid, 1, 1024) == false) { err = "Invalid groupid"; } // Check meshid if (command.userid.indexOf('/') == -1) { command.userid = 'user/' + domain.id + '/' + command.userid; } if (command.userid == obj.user._id) { err = "Can't remove self"; } // Can't add of modify self - if ((command.userid.split('/').length != 3) || (command.userid.split('/')[1] != domain.id)) { err = "Invalid userid"; } // Invalid domain, operation only valid for current domain + if ((command.userid.split('/').length != 3) || ((obj.crossDomain !== true) && (command.userid.split('/')[1] != domain.id))) { err = "Invalid userid"; } // Invalid domain, operation only valid for current domain else { if (command.meshid.indexOf('/') == -1) { command.meshid = 'mesh/' + domain.id + '/' + command.meshid; } mesh = parent.meshes[command.meshid]; + var meshIdSplit = command.meshid.split('/'); if (mesh == null) { err = "Unknown device group"; } else if ((parent.GetMeshRights(user, mesh) & MESHRIGHT_MANAGEUSERS) == 0) { err = "Permission denied"; } - else if ((command.meshid.split('/').length != 3) || (command.meshid.split('/')[1] != domain.id)) { err = "Invalid domain"; } // Invalid domain, operation only valid for current domain + else if (meshIdSplit.length != 3) { err = "Invalid domain"; } // Invalid domain, operation only valid for current domain + else { + xdomain = domain; + if (obj.crossDomain !== true) { xdomain = parent.parent.config.domains[meshIdSplit[1]]; } + if (xdomain == null) { err = "Invalid domain"; } + } } } catch (ex) { err = "Validation exception: " + ex; } // Handle any errors if (err != null) { - if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'addmeshuser', responseid: command.responseid, result: err })); } catch (ex) { } } + console.log(err); + if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'removemeshuser', responseid: command.responseid, result: err })); } catch (ex) { } } break; } @@ -2879,9 +2913,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use else if (deluserid.startsWith('ugrp/')) { deluser = parent.userGroups[deluserid]; } // Search for a user name in that windows domain is the username starts with *\ - if ((deluser == null) && (deluserid.startsWith('user/' + domain.id + '/*\\')) == true) { + if ((deluser == null) && (deluserid.startsWith('user/' + xdomain.id + '/*\\')) == true) { var search = deluserid.split('/')[2].substring(1); - for (var i in parent.users) { if (i.endsWith(search) && (parent.users[i].domain == domain.id)) { deluser = parent.users[i]; command.userid = deluserid = deluser._id; break; } } + for (var i in parent.users) { if (i.endsWith(search) && (parent.users[i].domain == xdomain.id)) { deluser = parent.users[i]; command.userid = deluserid = deluser._id; break; } } } if (deluser != null) { @@ -2897,13 +2931,13 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (deluserid.startsWith('user/')) { // Notify user change var targets = ['*', 'server-users', user._id, deluser._id]; - var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(deluser), action: 'accountchange', msg: 'Device group membership changed: ' + deluser.name, domain: domain.id }; + var event = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(deluser), action: 'accountchange', msg: 'Device group membership changed: ' + deluser.name, domain: xdomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. parent.parent.DispatchEvent(targets, obj, event); } else if (deluserid.startsWith('ugrp/')) { // Notify user group change var targets = ['*', 'server-ugroups', user._id, deluser._id]; - var event = { etype: 'ugrp', username: user.name, ugrpid: deluser._id, name: deluser.name, desc: deluser.desc, action: 'usergroupchange', links: deluser.links, msg: 'User group changed: ' + deluser.name, domain: domain.id }; + var event = { etype: 'ugrp', username: user.name, ugrpid: deluser._id, name: deluser.name, desc: deluser.desc, action: 'usergroupchange', links: deluser.links, msg: 'User group changed: ' + deluser.name, domain: xdomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come. parent.parent.DispatchEvent(targets, obj, event); } @@ -2918,9 +2952,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Notify mesh change var event; if (deluser != null) { - event = { etype: 'mesh', username: user.name, userid: deluser.name, meshid: mesh._id, name: mesh.name, mtype: mesh.mtype, desc: mesh.desc, action: 'meshchange', links: mesh.links, msg: 'Removed user ' + deluser.name + ' from group ' + mesh.name, domain: domain.id, invite: mesh.invite }; + event = { etype: 'mesh', username: user.name, userid: deluser.name, meshid: mesh._id, name: mesh.name, mtype: mesh.mtype, desc: mesh.desc, action: 'meshchange', links: mesh.links, msg: 'Removed user ' + deluser.name + ' from group ' + mesh.name, domain: xdomain.id, invite: mesh.invite }; } else { - event = { etype: 'mesh', username: user.name, userid: (deluserid.split('/')[2]), meshid: mesh._id, name: mesh.name, mtype: mesh.mtype, desc: mesh.desc, action: 'meshchange', links: mesh.links, msg: 'Removed user ' + (deluserid.split('/')[2]) + ' from group ' + mesh.name, domain: domain.id, invite: mesh.invite }; + event = { etype: 'mesh', username: user.name, userid: (deluserid.split('/')[2]), meshid: mesh._id, name: mesh.name, mtype: mesh.mtype, desc: mesh.desc, action: 'meshchange', links: mesh.links, msg: 'Removed user ' + (deluserid.split('/')[2]) + ' from group ' + mesh.name, domain: xdomain.id, invite: mesh.invite }; } parent.parent.DispatchEvent(parent.CreateMeshDispatchTargets(mesh, [user._id, command.userid]), obj, event); if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'removemeshuser', responseid: command.responseid, result: 'ok' })); } catch (ex) { } } @@ -3054,7 +3088,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Handle any errors if (err != null) { - if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'addmeshuser', responseid: command.responseid, result: err })); } catch (ex) { } } + if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'changeDeviceMesh', responseid: command.responseid, result: err })); } catch (ex) { } } break; } diff --git a/translate/translate.json b/translate/translate.json index 42d213f3..38d14118 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -192,7 +192,7 @@ "zh-chs": " 用戶需要先登錄到該服務器一次,然後才能將其添加到設備組。", "xloc": [ "default.handlebars->25->1258", - "default.handlebars->25->1566" + "default.handlebars->25->1569" ] }, { @@ -619,7 +619,7 @@ "default-mobile.handlebars->9->108", "default-mobile.handlebars->9->284", "default.handlebars->25->1365", - "default.handlebars->25->1712", + "default.handlebars->25->1715", "default.handlebars->25->750" ] }, @@ -669,7 +669,7 @@ "ru": "1 активная сессия", "zh-chs": "1個活動會話", "xloc": [ - "default.handlebars->25->1630" + "default.handlebars->25->1633" ] }, { @@ -731,7 +731,7 @@ "ru": "1 группа", "zh-chs": "1組", "xloc": [ - "default.handlebars->25->1595" + "default.handlebars->25->1598" ] }, { @@ -1131,7 +1131,7 @@ "zh-chs": "啟用第二因素身份驗證", "xloc": [ "default.handlebars->25->1436", - "default.handlebars->25->1617" + "default.handlebars->25->1620" ] }, { @@ -1878,7 +1878,7 @@ "ru": "Доступ к файлам сервера", "zh-chs": "訪問服務器文件", "xloc": [ - "default.handlebars->25->1572" + "default.handlebars->25->1575" ] }, { @@ -2003,7 +2003,7 @@ "zh-chs": "帐户已被锁定", "xloc": [ "default.handlebars->25->1438", - "default.handlebars->25->1569" + "default.handlebars->25->1572" ] }, { @@ -2278,8 +2278,8 @@ "ru": "Добавить устройство", "zh-chs": "添加設備", "xloc": [ - "default.handlebars->25->1546", - "default.handlebars->25->1663" + "default.handlebars->25->1549", + "default.handlebars->25->1666" ] }, { @@ -2314,8 +2314,8 @@ "zh-chs": "添加設備組", "xloc": [ "default.handlebars->25->1290", - "default.handlebars->25->1540", - "default.handlebars->25->1651", + "default.handlebars->25->1543", + "default.handlebars->25->1654", "default.handlebars->25->198" ] }, @@ -2432,7 +2432,7 @@ "ru": "Добавить участие", "zh-chs": "添加會員", "xloc": [ - "default.handlebars->25->1681" + "default.handlebars->25->1684" ] }, { @@ -2524,7 +2524,7 @@ "xloc": [ "default.handlebars->25->1190", "default.handlebars->25->1289", - "default.handlebars->25->1657", + "default.handlebars->25->1660", "default.handlebars->25->572" ] }, @@ -2585,7 +2585,7 @@ "zh-chs": "添加用戶", "xloc": [ "default.handlebars->25->1189", - "default.handlebars->25->1535" + "default.handlebars->25->1538" ] }, { @@ -2619,7 +2619,7 @@ "ru": "Добавить пользователей в группу", "zh-chs": "將用戶添加到用戶組", "xloc": [ - "default.handlebars->25->1568" + "default.handlebars->25->1571" ] }, { @@ -2826,7 +2826,7 @@ "ru": "Области администратора", "zh-chs": "管理領域", "xloc": [ - "default.handlebars->25->1599" + "default.handlebars->25->1602" ] }, { @@ -2989,7 +2989,7 @@ "ru": "Счетчик ошибок агента", "zh-chs": "座席錯誤計數器", "xloc": [ - "default.handlebars->25->1722" + "default.handlebars->25->1725" ] }, { @@ -3058,7 +3058,7 @@ "ru": "Сессии агентов", "zh-chs": "座席會議", "xloc": [ - "default.handlebars->25->1738" + "default.handlebars->25->1741" ] }, { @@ -3181,7 +3181,7 @@ "ru": "Агенты", "zh-chs": "代理商", "xloc": [ - "default.handlebars->25->1751" + "default.handlebars->25->1754" ] }, { @@ -3268,7 +3268,7 @@ "zh-chs": "允許用戶管理此設備組和該組中的設備。", "xloc": [ "default.handlebars->25->1256", - "default.handlebars->25->1565" + "default.handlebars->25->1568" ] }, { @@ -3372,7 +3372,7 @@ "zh-chs": "始終通知", "xloc": [ "default.handlebars->25->1170", - "default.handlebars->25->1608", + "default.handlebars->25->1611", "default.handlebars->25->518" ] }, @@ -3391,7 +3391,7 @@ "zh-chs": "總是提示", "xloc": [ "default.handlebars->25->1171", - "default.handlebars->25->1609", + "default.handlebars->25->1612", "default.handlebars->25->519" ] }, @@ -4001,7 +4001,7 @@ "ru": "Вы уверенны, что {0} плагин: {1}", "zh-chs": "您確定要{0}插件嗎:{1}", "xloc": [ - "default.handlebars->25->1791" + "default.handlebars->25->1794" ] }, { @@ -4097,7 +4097,7 @@ "ru": "Приложение аутентификации", "zh-chs": "身份驗證應用", "xloc": [ - "default.handlebars->25->1612" + "default.handlebars->25->1615" ] }, { @@ -4414,7 +4414,7 @@ "ru": "Резервные коды", "zh-chs": "備用碼", "xloc": [ - "default.handlebars->25->1614" + "default.handlebars->25->1617" ] }, { @@ -4431,7 +4431,7 @@ "ru": "Плохой ключ", "zh-chs": "錯誤的簽名", "xloc": [ - "default.handlebars->25->1729" + "default.handlebars->25->1732" ] }, { @@ -4448,7 +4448,7 @@ "ru": "Плохой веб-сертификат", "zh-chs": "錯誤的網絡證書", "xloc": [ - "default.handlebars->25->1728" + "default.handlebars->25->1731" ] }, { @@ -4586,7 +4586,7 @@ "ru": "Отправить сообщение", "zh-chs": "廣播", "xloc": [ - "default.handlebars->25->1533", + "default.handlebars->25->1536", "default.handlebars->container->column_l->p4->3->1->0->3->1" ] }, @@ -4711,7 +4711,7 @@ "ru": "CIRA Сервер", "zh-chs": "CIRA服務器", "xloc": [ - "default.handlebars->25->1779" + "default.handlebars->25->1782" ] }, { @@ -4728,7 +4728,7 @@ "ru": "CIRA Сервер команды", "zh-chs": "CIRA服務器命令", "xloc": [ - "default.handlebars->25->1780" + "default.handlebars->25->1783" ] }, { @@ -4762,7 +4762,7 @@ "ru": "Загрузка CPU", "zh-chs": "CPU負載", "xloc": [ - "default.handlebars->25->1743" + "default.handlebars->25->1746" ] }, { @@ -4779,7 +4779,7 @@ "ru": "Загрузка CPU за последние 15 минут", "zh-chs": "最近15分鐘的CPU負載", "xloc": [ - "default.handlebars->25->1746" + "default.handlebars->25->1749" ] }, { @@ -4796,7 +4796,7 @@ "ru": "Загрузка CPU за последние 5 минут", "zh-chs": "最近5分鐘的CPU負載", "xloc": [ - "default.handlebars->25->1745" + "default.handlebars->25->1748" ] }, { @@ -4813,7 +4813,7 @@ "ru": "Загрузка CPU за последнюю минуту", "zh-chs": "最後一分鐘的CPU負載", "xloc": [ - "default.handlebars->25->1744" + "default.handlebars->25->1747" ] }, { @@ -4868,7 +4868,7 @@ "ru": "Ошибка вызова", "zh-chs": "通話錯誤", "xloc": [ - "default.handlebars->25->1792" + "default.handlebars->25->1795" ] }, { @@ -5008,7 +5008,7 @@ "ru": "Смена email для {0}", "zh-chs": "更改{0}的電子郵件", "xloc": [ - "default.handlebars->25->1640" + "default.handlebars->25->1643" ] }, { @@ -5046,7 +5046,7 @@ "xloc": [ "default-mobile.handlebars->9->90", "default.handlebars->25->1115", - "default.handlebars->25->1629" + "default.handlebars->25->1632" ] }, { @@ -5063,7 +5063,7 @@ "ru": "Смена пароля для {0}", "zh-chs": "更改{0}的密碼", "xloc": [ - "default.handlebars->25->1647" + "default.handlebars->25->1650" ] }, { @@ -5133,7 +5133,7 @@ "ru": "Изменить пароль для этого пользователя", "zh-chs": "更改該用戶的密碼", "xloc": [ - "default.handlebars->25->1628" + "default.handlebars->25->1631" ] }, { @@ -5338,7 +5338,7 @@ "ru": "Проверка...", "zh-chs": "檢查...", "xloc": [ - "default.handlebars->25->1786", + "default.handlebars->25->1789", "default.handlebars->25->888" ] }, @@ -5554,7 +5554,7 @@ "nl": "Wis alle meldingen", "zh-chs": "全部清除", "xloc": [ - "default.handlebars->25->1716" + "default.handlebars->25->1719" ] }, { @@ -5604,7 +5604,7 @@ "ru": "Очистить это уведомление", "zh-chs": "清除此通知", "xloc": [ - "default.handlebars->25->1715" + "default.handlebars->25->1718" ] }, { @@ -5680,7 +5680,7 @@ "nl": "Klik hier om de gebruikersgroepsnaam te bewerken", "zh-chs": "单击此处编辑用户组名称", "xloc": [ - "default.handlebars->25->1525" + "default.handlebars->25->1527" ] }, { @@ -5855,8 +5855,8 @@ "ru": "Общие группы устройств", "zh-chs": "通用設備組", "xloc": [ - "default.handlebars->25->1541", - "default.handlebars->25->1652" + "default.handlebars->25->1544", + "default.handlebars->25->1655" ] }, { @@ -5873,8 +5873,8 @@ "ru": "Общие устройства", "zh-chs": "通用設備", "xloc": [ - "default.handlebars->25->1547", - "default.handlebars->25->1664" + "default.handlebars->25->1550", + "default.handlebars->25->1667" ] }, { @@ -5914,8 +5914,8 @@ "default.handlebars->25->1235", "default.handlebars->25->1448", "default.handlebars->25->1517", - "default.handlebars->25->1561", - "default.handlebars->25->1650", + "default.handlebars->25->1564", + "default.handlebars->25->1653", "default.handlebars->25->408", "default.handlebars->25->647", "default.handlebars->25->656" @@ -6016,7 +6016,7 @@ "ru": "Подтвердить удаление пользователя {0}?", "zh-chs": "確認刪除用戶{0}?", "xloc": [ - "default.handlebars->25->1649" + "default.handlebars->25->1652" ] }, { @@ -6030,7 +6030,7 @@ "nl": "Bevestig lidmaatschap verwijderen van gebruiker \\\"{0}\\\"?", "zh-chs": "确认删除用户\\“ {0} \\”的成员身份?", "xloc": [ - "default.handlebars->25->1564" + "default.handlebars->25->1567" ] }, { @@ -6044,7 +6044,7 @@ "nl": "Bevestig lidmaatschap verwijdering van gebruikergroep \\\"{0}\\\"?", "zh-chs": "确认删除用户组 “{0}” 的成员身份?", "xloc": [ - "default.handlebars->25->1679" + "default.handlebars->25->1682" ] }, { @@ -6111,8 +6111,8 @@ "nl": "Bevestig verwijdering van toegangsrechten voor apparaat \\\"{0}\\\"?", "zh-chs": "确认删除设备“ {0} ”的访问权限?", "xloc": [ - "default.handlebars->25->1554", - "default.handlebars->25->1670" + "default.handlebars->25->1557", + "default.handlebars->25->1673" ] }, { @@ -6126,8 +6126,8 @@ "nl": "Bevestig verwijdering van toegangsrechten voor apparaatgroep \\\"{0}\\\"?", "zh-chs": "是否确认删除设备组“ {0}”的访问权限?", "xloc": [ - "default.handlebars->25->1556", - "default.handlebars->25->1683" + "default.handlebars->25->1559", + "default.handlebars->25->1686" ] }, { @@ -6141,7 +6141,7 @@ "nl": "Bevestig verwijdering van toegangsrechten voor gebruiker \\\"{0}\\\"?", "zh-chs": "确认删除用户\\“ {0} \\”的访问权限?", "xloc": [ - "default.handlebars->25->1672" + "default.handlebars->25->1675" ] }, { @@ -6155,7 +6155,7 @@ "nl": "Bevestig verwijdering van toegangsrechten voor gebruikergroep \\\"{0}\\\"?", "zh-chs": "确认删除用户组“ {0}”的访问权限?", "xloc": [ - "default.handlebars->25->1675" + "default.handlebars->25->1678" ] }, { @@ -6169,8 +6169,8 @@ "nl": "Verwijdering van toegangsrechten bevestigen?", "zh-chs": "确认删除访问权限?", "xloc": [ - "default.handlebars->25->1673", - "default.handlebars->25->1676" + "default.handlebars->25->1676", + "default.handlebars->25->1679" ] }, { @@ -6417,7 +6417,7 @@ "ru": "Подключено Intel® AMT", "zh-chs": "連接的英特爾®AMT", "xloc": [ - "default.handlebars->25->1734" + "default.handlebars->25->1737" ] }, { @@ -6434,7 +6434,7 @@ "ru": "Подключенные пользователи", "zh-chs": "關聯用戶", "xloc": [ - "default.handlebars->25->1739" + "default.handlebars->25->1742" ] }, { @@ -6511,7 +6511,7 @@ "ru": "Подключений ", "zh-chs": "連接數", "xloc": [ - "default.handlebars->25->1750" + "default.handlebars->25->1753" ] }, { @@ -6528,7 +6528,7 @@ "ru": "Ретранслятор подключения", "zh-chs": "連接繼電器", "xloc": [ - "default.handlebars->25->1778" + "default.handlebars->25->1781" ] }, { @@ -6655,7 +6655,7 @@ "ru": "Cookie-кодировщик", "zh-chs": "Cookie編碼器", "xloc": [ - "default.handlebars->25->1764" + "default.handlebars->25->1767" ] }, { @@ -6960,7 +6960,7 @@ "ru": "Основной сервер", "zh-chs": "核心服務器", "xloc": [ - "default.handlebars->25->1763" + "default.handlebars->25->1766" ] }, { @@ -7030,7 +7030,7 @@ "ru": "Создать группу пользователей", "zh-chs": "創建用戶組", "xloc": [ - "default.handlebars->25->1522" + "default.handlebars->25->1524" ] }, { @@ -7116,7 +7116,7 @@ "ru": "Создано", "zh-chs": "創建", "xloc": [ - "default.handlebars->25->1588" + "default.handlebars->25->1591" ] }, { @@ -7437,7 +7437,8 @@ "en": "Default", "nl": "Standaard", "xloc": [ - "default.handlebars->25->1474" + "default.handlebars->25->1474", + "default.handlebars->25->1520" ] }, { @@ -7588,7 +7589,7 @@ "ru": "Удалить пользователя", "zh-chs": "刪除用戶", "xloc": [ - "default.handlebars->25->1627" + "default.handlebars->25->1630" ] }, { @@ -7605,8 +7606,8 @@ "ru": "Удалить группу пользователей", "zh-chs": "刪除用戶組", "xloc": [ - "default.handlebars->25->1552", - "default.handlebars->25->1562" + "default.handlebars->25->1555", + "default.handlebars->25->1565" ] }, { @@ -7637,7 +7638,7 @@ "ru": "Удалить пользователя {0}", "zh-chs": "刪除用戶{0}", "xloc": [ - "default.handlebars->25->1648" + "default.handlebars->25->1651" ] }, { @@ -7741,7 +7742,7 @@ "ru": "Удалить группу пользователей {0}?", "zh-chs": "刪除用戶組{0}?", "xloc": [ - "default.handlebars->25->1560" + "default.handlebars->25->1563" ] }, { @@ -7878,10 +7879,10 @@ "default.handlebars->25->1127", "default.handlebars->25->1155", "default.handlebars->25->1238", - "default.handlebars->25->1521", - "default.handlebars->25->1528", - "default.handlebars->25->1529", - "default.handlebars->25->1558", + "default.handlebars->25->1523", + "default.handlebars->25->1530", + "default.handlebars->25->1531", + "default.handlebars->25->1561", "default.handlebars->25->477", "default.handlebars->25->478", "default.handlebars->25->688", @@ -7920,7 +7921,7 @@ "xloc": [ "default-mobile.handlebars->9->245", "default.handlebars->25->1243", - "default.handlebars->25->1693", + "default.handlebars->25->1696", "default.handlebars->25->444", "default.handlebars->container->topbar->1->1->MainSubMenuSpan->MainSubMenu->1->0->MainDevDesktop", "default.handlebars->contextMenu->cxdesktop" @@ -7958,7 +7959,7 @@ "zh-chs": "桌面通知", "xloc": [ "default.handlebars->25->1165", - "default.handlebars->25->1603", + "default.handlebars->25->1606", "default.handlebars->25->513" ] }, @@ -7977,7 +7978,7 @@ "zh-chs": "桌面提示", "xloc": [ "default.handlebars->25->1164", - "default.handlebars->25->1602", + "default.handlebars->25->1605", "default.handlebars->25->512" ] }, @@ -7996,7 +7997,7 @@ "zh-chs": "桌面提示+工具欄", "xloc": [ "default.handlebars->25->1162", - "default.handlebars->25->1600", + "default.handlebars->25->1603", "default.handlebars->25->510" ] }, @@ -8029,7 +8030,7 @@ "zh-chs": "桌面工具欄", "xloc": [ "default.handlebars->25->1163", - "default.handlebars->25->1601", + "default.handlebars->25->1604", "default.handlebars->25->511" ] }, @@ -8102,7 +8103,7 @@ "zh-chs": "設備", "xloc": [ "default.handlebars->25->1265", - "default.handlebars->25->1667", + "default.handlebars->25->1670", "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSort->sortselect->5" ] }, @@ -8141,10 +8142,10 @@ "default.handlebars->25->1260", "default.handlebars->25->1263", "default.handlebars->25->1264", - "default.handlebars->25->1544", - "default.handlebars->25->1550", - "default.handlebars->25->1655", - "default.handlebars->25->1702" + "default.handlebars->25->1547", + "default.handlebars->25->1553", + "default.handlebars->25->1658", + "default.handlebars->25->1705" ] }, { @@ -8182,9 +8183,9 @@ "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->3", "default.handlebars->25->1414", "default.handlebars->25->1508", - "default.handlebars->25->1531", - "default.handlebars->25->1597", - "default.handlebars->25->1737", + "default.handlebars->25->1534", + "default.handlebars->25->1600", + "default.handlebars->25->1740", "default.handlebars->container->column_l->p2->p2info->7" ] }, @@ -8244,7 +8245,7 @@ "zh-chs": "設備名稱", "xloc": [ "default-mobile.handlebars->9->267", - "default.handlebars->25->1701", + "default.handlebars->25->1704", "default.handlebars->25->244", "default.handlebars->25->686", "player.handlebars->3->9" @@ -8625,7 +8626,7 @@ "zh-chs": "设备", "xloc": [ "default.handlebars->25->1509", - "default.handlebars->25->1532" + "default.handlebars->25->1535" ] }, { @@ -8815,7 +8816,8 @@ "en": "Domain", "nl": "Domein", "xloc": [ - "default.handlebars->25->1475" + "default.handlebars->25->1475", + "default.handlebars->25->1521" ] }, { @@ -9263,7 +9265,7 @@ "nl": "Dubbele agent", "zh-chs": "代理重复", "xloc": [ - "default.handlebars->25->1733" + "default.handlebars->25->1736" ] }, { @@ -9297,7 +9299,7 @@ "ru": "Скопировать группу пользователей", "zh-chs": "重複的用戶組", "xloc": [ - "default.handlebars->25->1523" + "default.handlebars->25->1525" ] }, { @@ -9328,8 +9330,8 @@ "ru": "Длительность", "zh-chs": "持續時間", "xloc": [ - "default.handlebars->25->1687", - "default.handlebars->25->1707", + "default.handlebars->25->1690", + "default.handlebars->25->1710", "player.handlebars->3->2" ] }, @@ -9814,7 +9816,7 @@ "ru": "Редактировать группу пользователей", "zh-chs": "編輯用戶組", "xloc": [ - "default.handlebars->25->1559" + "default.handlebars->25->1562" ] }, { @@ -9864,10 +9866,10 @@ "xloc": [ "default-mobile.handlebars->9->78", "default.handlebars->25->1477", - "default.handlebars->25->1582", - "default.handlebars->25->1583", - "default.handlebars->25->1622", - "default.handlebars->25->1636", + "default.handlebars->25->1585", + "default.handlebars->25->1586", + "default.handlebars->25->1625", + "default.handlebars->25->1639", "default.handlebars->25->292", "login-mobile.handlebars->5->42", "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->tokenpanel->1->7->1->4->1->3", @@ -10001,7 +10003,7 @@ "zh-chs": "電子郵件已驗證", "xloc": [ "default.handlebars->25->1434", - "default.handlebars->25->1578" + "default.handlebars->25->1581" ] }, { @@ -10035,7 +10037,7 @@ "ru": "Email не подтвержден", "zh-chs": "電子郵件未驗證", "xloc": [ - "default.handlebars->25->1579" + "default.handlebars->25->1582" ] }, { @@ -10087,7 +10089,7 @@ "nl": "Email/SMS verkeer", "zh-chs": "电子邮件/短信流量", "xloc": [ - "default.handlebars->25->1772" + "default.handlebars->25->1775" ] }, { @@ -10185,7 +10187,7 @@ "en": "Enabled", "nl": "Ingeschakeld", "xloc": [ - "default.handlebars->25->1709" + "default.handlebars->25->1712" ] }, { @@ -10209,7 +10211,7 @@ "en": "End Time", "nl": "Eindtijd", "xloc": [ - "default.handlebars->25->1706" + "default.handlebars->25->1709" ] }, { @@ -10772,7 +10774,7 @@ "ru": "Внешний", "zh-chs": "外部", "xloc": [ - "default.handlebars->25->1757" + "default.handlebars->25->1760" ] }, { @@ -10978,7 +10980,7 @@ "default-mobile.handlebars->9->165", "default-mobile.handlebars->9->246", "default.handlebars->25->1250", - "default.handlebars->25->1694", + "default.handlebars->25->1697", "default.handlebars->25->218", "default.handlebars->container->topbar->1->1->MainSubMenuSpan->MainSubMenu->1->0->MainDevFiles", "default.handlebars->contextMenu->cxfiles" @@ -11016,7 +11018,7 @@ "zh-chs": "文件通知", "xloc": [ "default.handlebars->25->1169", - "default.handlebars->25->1607", + "default.handlebars->25->1610", "default.handlebars->25->517" ] }, @@ -11035,7 +11037,7 @@ "zh-chs": "文件提示", "xloc": [ "default.handlebars->25->1168", - "default.handlebars->25->1606", + "default.handlebars->25->1609", "default.handlebars->25->516" ] }, @@ -11197,7 +11199,7 @@ "zh-chs": "下次登錄時強制重置密碼。", "xloc": [ "default.handlebars->25->1482", - "default.handlebars->25->1645" + "default.handlebars->25->1648" ] }, { @@ -11283,8 +11285,8 @@ "ru": "Свободно", "zh-chs": "自由", "xloc": [ - "default.handlebars->25->1718", - "default.handlebars->25->1720" + "default.handlebars->25->1721", + "default.handlebars->25->1723" ] }, { @@ -11578,7 +11580,7 @@ "ru": "Администратор с полным доступом", "zh-chs": "正式管理員", "xloc": [ - "default.handlebars->25->1573" + "default.handlebars->25->1576" ] }, { @@ -12017,6 +12019,12 @@ "default.handlebars->container->column_l->p50->3->1->0->3->3" ] }, + { + "en": "Group Identifier", + "xloc": [ + "default.handlebars->25->1532" + ] + }, { "cs": "Členové skupiny", "de": "Gruppenmitglieder", @@ -12031,7 +12039,7 @@ "ru": "Члены группы", "zh-chs": "小組成員", "xloc": [ - "default.handlebars->25->1536" + "default.handlebars->25->1539" ] }, { @@ -12203,7 +12211,7 @@ "ru": "Всего кучи", "zh-chs": "堆總數", "xloc": [ - "default.handlebars->25->1759" + "default.handlebars->25->1762" ] }, { @@ -12220,7 +12228,7 @@ "ru": "Куча используется", "zh-chs": "堆使用", "xloc": [ - "default.handlebars->25->1758" + "default.handlebars->25->1761" ] }, { @@ -13011,8 +13019,8 @@ "xloc": [ "default.handlebars->25->1352", "default.handlebars->25->1360", - "default.handlebars->25->1755", - "default.handlebars->25->1777" + "default.handlebars->25->1758", + "default.handlebars->25->1780" ] }, { @@ -13053,14 +13061,14 @@ "en": "Intel AMT Redirection", "nl": "Intel AMT omleiding", "xloc": [ - "default.handlebars->25->1696" + "default.handlebars->25->1699" ] }, { "en": "Intel AMT WSMAN", "nl": "Intel AMT WSMAN", "xloc": [ - "default.handlebars->25->1695" + "default.handlebars->25->1698" ] }, { @@ -13745,7 +13753,7 @@ "ru": "Некорректный тип группы устройств", "zh-chs": "無效的設備組類型", "xloc": [ - "default.handlebars->25->1732" + "default.handlebars->25->1735" ] }, { @@ -13762,7 +13770,7 @@ "ru": "Некорректный JSON", "zh-chs": "無效的JSON", "xloc": [ - "default.handlebars->25->1726" + "default.handlebars->25->1729" ] }, { @@ -13814,7 +13822,7 @@ "ru": "Некорректная сигнатура PKCS", "zh-chs": "無效的PKCS簽名", "xloc": [ - "default.handlebars->25->1724" + "default.handlebars->25->1727" ] }, { @@ -13831,7 +13839,7 @@ "ru": "Некорректная сигнатура RSA", "zh-chs": "無效的RSA密碼", "xloc": [ - "default.handlebars->25->1725" + "default.handlebars->25->1728" ] }, { @@ -14658,7 +14666,7 @@ "ru": "Последний вход в систему", "zh-chs": "上次登錄", "xloc": [ - "default.handlebars->25->1589" + "default.handlebars->25->1592" ] }, { @@ -14721,7 +14729,7 @@ "ru": "Последнее изменение: {0}", "zh-chs": "上次更改:{0}", "xloc": [ - "default.handlebars->25->1593" + "default.handlebars->25->1596" ] }, { @@ -14888,7 +14896,7 @@ "nl": "Leeg laten voor geen.", "zh-chs": "一无所有。", "xloc": [ - "default.handlebars->25->1633" + "default.handlebars->25->1636" ] }, { @@ -14927,7 +14935,7 @@ "ru": "Меньше", "zh-chs": "減", "xloc": [ - "default.handlebars->25->1794" + "default.handlebars->25->1797" ] }, { @@ -15523,7 +15531,7 @@ "ru": "Заблокированная учетная запись", "zh-chs": "賬戶鎖定", "xloc": [ - "default.handlebars->25->1570" + "default.handlebars->25->1573" ] }, { @@ -16036,7 +16044,7 @@ "ru": "Сообщения главного сервера", "zh-chs": "主服務器消息", "xloc": [ - "default.handlebars->25->1766" + "default.handlebars->25->1769" ] }, { @@ -16462,7 +16470,7 @@ "ru": "Достигнуто максимальное число сессий", "zh-chs": "達到的會話數上限", "xloc": [ - "default.handlebars->25->1730" + "default.handlebars->25->1733" ] }, { @@ -16516,7 +16524,7 @@ "ru": "Мегабайт", "zh-chs": "兆字節", "xloc": [ - "default.handlebars->25->1756" + "default.handlebars->25->1759" ] }, { @@ -16534,7 +16542,7 @@ "zh-chs": "記憶", "xloc": [ "default-mobile.handlebars->9->366", - "default.handlebars->25->1747", + "default.handlebars->25->1750", "default.handlebars->25->842", "default.handlebars->container->column_l->p40->3->1->p40type->3" ] @@ -16672,7 +16680,7 @@ "ru": "Трафик MeshAgent", "zh-chs": "MeshAgent流量", "xloc": [ - "default.handlebars->25->1768" + "default.handlebars->25->1771" ] }, { @@ -16689,7 +16697,7 @@ "ru": "Обновление MeshAgent", "zh-chs": "MeshAgent更新", "xloc": [ - "default.handlebars->25->1769" + "default.handlebars->25->1772" ] }, { @@ -16792,7 +16800,7 @@ "ru": "Соединения сервера MeshCentral", "zh-chs": "MeshCentral服務器對等", "xloc": [ - "default.handlebars->25->1767" + "default.handlebars->25->1770" ] }, { @@ -17056,7 +17064,7 @@ "ru": "Диспетчер сообщения", "zh-chs": "郵件調度程序", "xloc": [ - "default.handlebars->25->1765" + "default.handlebars->25->1768" ] }, { @@ -17205,7 +17213,7 @@ "ru": "Еще", "zh-chs": "更多", "xloc": [ - "default.handlebars->25->1793" + "default.handlebars->25->1796" ] }, { @@ -17281,7 +17289,7 @@ "en": "Multiplexor", "nl": "Multiplexor", "xloc": [ - "default.handlebars->25->1708" + "default.handlebars->25->1711" ] }, { @@ -17554,10 +17562,10 @@ "default.handlebars->25->1237", "default.handlebars->25->1413", "default.handlebars->25->1506", - "default.handlebars->25->1520", - "default.handlebars->25->1527", - "default.handlebars->25->1557", - "default.handlebars->25->1576", + "default.handlebars->25->1522", + "default.handlebars->25->1529", + "default.handlebars->25->1560", + "default.handlebars->25->1579", "default.handlebars->25->467", "default.handlebars->25->717", "default.handlebars->25->77", @@ -17953,7 +17961,7 @@ "zh-chs": "找不到活動", "xloc": [ "default.handlebars->25->1403", - "default.handlebars->25->1684", + "default.handlebars->25->1687", "default.handlebars->25->788" ] }, @@ -18097,7 +18105,7 @@ "ru": "Нет членов", "zh-chs": "沒有會員", "xloc": [ - "default.handlebars->25->1539" + "default.handlebars->25->1542" ] }, { @@ -18247,8 +18255,8 @@ "ru": "Нет общих групп устройств", "zh-chs": "沒有共同的設備組", "xloc": [ - "default.handlebars->25->1545", - "default.handlebars->25->1656" + "default.handlebars->25->1548", + "default.handlebars->25->1659" ] }, { @@ -18344,8 +18352,8 @@ "ru": "Нет общих устройств", "zh-chs": "沒有共同的設備", "xloc": [ - "default.handlebars->25->1551", - "default.handlebars->25->1668" + "default.handlebars->25->1554", + "default.handlebars->25->1671" ] }, { @@ -18535,7 +18543,7 @@ "ru": "Нет серверных прав", "zh-chs": "沒有服務器權限", "xloc": [ - "default.handlebars->25->1571" + "default.handlebars->25->1574" ] }, { @@ -18552,7 +18560,7 @@ "ru": "Нет членства в группах пользователей", "zh-chs": "沒有用戶組成員身份", "xloc": [ - "default.handlebars->25->1662" + "default.handlebars->25->1665" ] }, { @@ -18654,13 +18662,13 @@ "default.handlebars->25->1179", "default.handlebars->25->1354", "default.handlebars->25->1373", - "default.handlebars->25->1524", "default.handlebars->25->1526", + "default.handlebars->25->1528", "default.handlebars->25->158", - "default.handlebars->25->1585", - "default.handlebars->25->1594", - "default.handlebars->25->1598", - "default.handlebars->25->1610", + "default.handlebars->25->1588", + "default.handlebars->25->1597", + "default.handlebars->25->1601", + "default.handlebars->25->1613", "default.handlebars->25->174", "default.handlebars->25->175", "default.handlebars->25->464", @@ -18820,7 +18828,7 @@ "en": "Not on server", "nl": "Niet op de server", "xloc": [ - "default.handlebars->25->1700" + "default.handlebars->25->1703" ] }, { @@ -18837,7 +18845,7 @@ "ru": "Не задано", "zh-chs": "沒有設置", "xloc": [ - "default.handlebars->25->1577" + "default.handlebars->25->1580" ] }, { @@ -18854,7 +18862,7 @@ "ru": "не подтверждено", "zh-chs": "未經審核的", "xloc": [ - "default.handlebars->25->1638" + "default.handlebars->25->1641" ] }, { @@ -18872,7 +18880,7 @@ "zh-chs": "筆記", "xloc": [ "default.handlebars->25->1187", - "default.handlebars->25->1618", + "default.handlebars->25->1621", "default.handlebars->25->536", "default.handlebars->25->590", "default.handlebars->25->609", @@ -18980,7 +18988,7 @@ "ru": "Уведомить", "zh-chs": "通知", "xloc": [ - "default.handlebars->25->1624" + "default.handlebars->25->1627" ] }, { @@ -19094,7 +19102,7 @@ "ru": "Произошло в {0}", "zh-chs": "發生在{0}", "xloc": [ - "default.handlebars->25->1714" + "default.handlebars->25->1717" ] }, { @@ -19578,7 +19586,7 @@ "ru": "Частичные права", "zh-chs": "部分權利", "xloc": [ - "default.handlebars->25->1574" + "default.handlebars->25->1577" ] }, { @@ -19615,10 +19623,10 @@ "default-mobile.handlebars->9->258", "default.handlebars->25->1478", "default.handlebars->25->1479", - "default.handlebars->25->1590", - "default.handlebars->25->1592", - "default.handlebars->25->1641", - "default.handlebars->25->1642", + "default.handlebars->25->1593", + "default.handlebars->25->1595", + "default.handlebars->25->1644", + "default.handlebars->25->1645", "default.handlebars->25->249", "default.handlebars->25->278", "default.handlebars->25->635" @@ -19727,7 +19735,7 @@ "ru": "Подсказка пароля", "zh-chs": "密碼提示", "xloc": [ - "default.handlebars->25->1643" + "default.handlebars->25->1646" ] }, { @@ -20049,7 +20057,7 @@ "default-mobile.handlebars->9->65", "default-mobile.handlebars->9->67", "default.handlebars->25->143", - "default.handlebars->25->1635", + "default.handlebars->25->1638", "default.handlebars->25->868", "default.handlebars->25->871" ] @@ -20064,7 +20072,7 @@ "nl": "Telefoonnummer", "zh-chs": "电话号码", "xloc": [ - "default.handlebars->25->1584" + "default.handlebars->25->1587" ] }, { @@ -20078,7 +20086,7 @@ "zh-chs": "电话号码:", "xloc": [ "default-mobile.handlebars->9->66", - "default.handlebars->25->1634", + "default.handlebars->25->1637", "default.handlebars->25->870" ] }, @@ -20215,7 +20223,7 @@ "zh-chs": "插件動作", "xloc": [ "default.handlebars->25->169", - "default.handlebars->25->1790" + "default.handlebars->25->1793" ] }, { @@ -20533,7 +20541,7 @@ "en": "Present on server", "nl": "Aanwezig op de server", "xloc": [ - "default.handlebars->25->1699" + "default.handlebars->25->1702" ] }, { @@ -20647,7 +20655,7 @@ "ru": "Протокол", "zh-chs": "協議", "xloc": [ - "default.handlebars->25->1697", + "default.handlebars->25->1700", "player.handlebars->3->15" ] }, @@ -20955,7 +20963,7 @@ "ru": "RSS", "zh-chs": "的RSS", "xloc": [ - "default.handlebars->25->1760" + "default.handlebars->25->1763" ] }, { @@ -21050,7 +21058,7 @@ "en": "Recording Details", "nl": "Opname details", "xloc": [ - "default.handlebars->25->1711" + "default.handlebars->25->1714" ] }, { @@ -21174,7 +21182,7 @@ "ru": "Число ретрансляций", "zh-chs": "中繼計數", "xloc": [ - "default.handlebars->25->1742" + "default.handlebars->25->1745" ] }, { @@ -21191,7 +21199,7 @@ "ru": "Ошибки ретранслятора", "zh-chs": "中繼錯誤", "xloc": [ - "default.handlebars->25->1735" + "default.handlebars->25->1738" ] }, { @@ -21208,8 +21216,8 @@ "ru": "Сессии ретранслятора", "zh-chs": "接力會議", "xloc": [ - "default.handlebars->25->1741", - "default.handlebars->25->1754" + "default.handlebars->25->1744", + "default.handlebars->25->1757" ] }, { @@ -21529,8 +21537,8 @@ "nl": "Apparaatgroepmachtigingen verwijderen", "zh-chs": "删除设备组权限", "xloc": [ - "default.handlebars->25->1555", - "default.handlebars->25->1682" + "default.handlebars->25->1558", + "default.handlebars->25->1685" ] }, { @@ -21544,8 +21552,8 @@ "nl": "Apparaatmachtigingen verwijderen", "zh-chs": "删除设备权限", "xloc": [ - "default.handlebars->25->1553", - "default.handlebars->25->1669" + "default.handlebars->25->1556", + "default.handlebars->25->1672" ] }, { @@ -21573,7 +21581,7 @@ "nl": "Lidmaatschap van gebruikersgroep verwijderen", "zh-chs": "删除用户组成员身份", "xloc": [ - "default.handlebars->25->1678" + "default.handlebars->25->1681" ] }, { @@ -21588,7 +21596,7 @@ "zh-chs": "删除用户组权限", "xloc": [ "default.handlebars->25->1328", - "default.handlebars->25->1674" + "default.handlebars->25->1677" ] }, { @@ -21602,7 +21610,7 @@ "nl": "Gebruikerslidmaatschap verwijderen", "zh-chs": "删除用户成员资格", "xloc": [ - "default.handlebars->25->1563" + "default.handlebars->25->1566" ] }, { @@ -21617,7 +21625,7 @@ "zh-chs": "删除用户权限", "xloc": [ "default.handlebars->25->1326", - "default.handlebars->25->1671" + "default.handlebars->25->1674" ] }, { @@ -21634,7 +21642,7 @@ "ru": "Удалить все двухфакторные аутентификации.", "zh-chs": "刪除所有第二因素驗證。", "xloc": [ - "default.handlebars->25->1646" + "default.handlebars->25->1649" ] }, { @@ -21732,7 +21740,7 @@ "ru": "Удалить этого пользователя", "zh-chs": "删除该用户", "xloc": [ - "default.handlebars->25->1626" + "default.handlebars->25->1629" ] }, { @@ -21749,7 +21757,7 @@ "ru": "Удалить членство пользователя в группе", "zh-chs": "刪除用戶組成員身份", "xloc": [ - "default.handlebars->25->1660" + "default.handlebars->25->1663" ] }, { @@ -21763,7 +21771,7 @@ "nl": "Gebruikersrechten voor dit apparaat verwijderen", "zh-chs": "删除此设备的用户组权限", "xloc": [ - "default.handlebars->25->1549" + "default.handlebars->25->1552" ] }, { @@ -21780,7 +21788,7 @@ "ru": "Удалить права группы пользователей для этой группы устройств", "zh-chs": "刪除該設備組的用戶組權限", "xloc": [ - "default.handlebars->25->1543", + "default.handlebars->25->1546", "default.handlebars->25->574" ] }, @@ -21799,9 +21807,9 @@ "zh-chs": "刪除此設備組的用戶權限", "xloc": [ "default.handlebars->25->1204", - "default.handlebars->25->1537", - "default.handlebars->25->1654", - "default.handlebars->25->1666", + "default.handlebars->25->1540", + "default.handlebars->25->1657", + "default.handlebars->25->1669", "default.handlebars->25->575" ] }, @@ -21864,7 +21872,7 @@ "xloc": [ "default-mobile.handlebars->9->89", "default.handlebars->25->1486", - "default.handlebars->25->1644" + "default.handlebars->25->1647" ] }, { @@ -22106,7 +22114,7 @@ "ru": "Ограничения", "zh-chs": "限制條件", "xloc": [ - "default.handlebars->25->1575" + "default.handlebars->25->1578" ] }, { @@ -22329,8 +22337,8 @@ "nl": "SMS", "zh-chs": "短信", "xloc": [ - "default.handlebars->25->1615", - "default.handlebars->25->1620", + "default.handlebars->25->1618", + "default.handlebars->25->1623", "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->tokenpanel->1->7->1->4->1->3", "login.handlebars->container->column_l->centralTable->1->0->logincell->tokenpanel->1->7->1->4->1->3" ] @@ -22345,7 +22353,7 @@ "nl": "SMS geschikt telefoonnummer voor deze gebruiker.", "zh-chs": "此用户的短信功能电话号码。", "xloc": [ - "default.handlebars->25->1632" + "default.handlebars->25->1635" ] }, { @@ -22749,7 +22757,7 @@ "xloc": [ "default-mobile.handlebars->9->259", "default-mobile.handlebars->9->345", - "default.handlebars->25->1616", + "default.handlebars->25->1619", "default.handlebars->25->250", "default.handlebars->25->636", "default.handlebars->25->821" @@ -22769,7 +22777,7 @@ "ru": "Ключ безопасности", "zh-chs": "安全密鑰", "xloc": [ - "default.handlebars->25->1613" + "default.handlebars->25->1616" ] }, { @@ -23060,14 +23068,14 @@ "nl": "Stuur een SMS bericht naar deze gebruiker", "zh-chs": "发送短信给该用户", "xloc": [ - "default.handlebars->25->1621" + "default.handlebars->25->1624" ] }, { "en": "Send a email message to this user", "nl": "Stuur een e-mailbericht naar deze gebruiker", "xloc": [ - "default.handlebars->25->1623" + "default.handlebars->25->1626" ] }, { @@ -23084,7 +23092,7 @@ "ru": "Отправить уведомление всем пользователям этой группы.", "zh-chs": "向該組中的所有用戶發送通知。", "xloc": [ - "default.handlebars->25->1534" + "default.handlebars->25->1537" ] }, { @@ -23217,7 +23225,7 @@ "ru": "Отправить уведомление пользователю", "zh-chs": "發送用戶通知", "xloc": [ - "default.handlebars->25->1625" + "default.handlebars->25->1628" ] }, { @@ -23286,7 +23294,7 @@ "ru": "Сертификат сервера", "zh-chs": "服務器證書", "xloc": [ - "default.handlebars->25->1770" + "default.handlebars->25->1773" ] }, { @@ -23303,7 +23311,7 @@ "ru": "База данных сервера", "zh-chs": "服務器數據庫", "xloc": [ - "default.handlebars->25->1771" + "default.handlebars->25->1774" ] }, { @@ -23361,7 +23369,7 @@ "ru": "Квота сервера", "zh-chs": "服務器配額", "xloc": [ - "default.handlebars->25->1587" + "default.handlebars->25->1590" ] }, { @@ -23395,7 +23403,7 @@ "ru": "Права", "zh-chs": "服務器權限", "xloc": [ - "default.handlebars->25->1586" + "default.handlebars->25->1589" ] }, { @@ -23412,7 +23420,7 @@ "ru": "Состояние сервера", "zh-chs": "服務器狀態", "xloc": [ - "default.handlebars->25->1721" + "default.handlebars->25->1724" ] }, { @@ -23446,7 +23454,7 @@ "ru": "Трассировка сервера", "zh-chs": "服務器跟踪", "xloc": [ - "default.handlebars->25->1781" + "default.handlebars->25->1784" ] }, { @@ -23585,7 +23593,7 @@ "ru": "ServerStats.csv", "zh-chs": "ServerStats.csv", "xloc": [ - "default.handlebars->25->1762" + "default.handlebars->25->1765" ] }, { @@ -23626,7 +23634,7 @@ "en": "Session", "nl": "Sessie", "xloc": [ - "default.handlebars->25->1685" + "default.handlebars->25->1688" ] }, { @@ -24165,8 +24173,8 @@ "ru": "Размер", "zh-chs": "尺寸", "xloc": [ - "default.handlebars->25->1688", - "default.handlebars->25->1703", + "default.handlebars->25->1691", + "default.handlebars->25->1706", "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSize" ] }, @@ -24977,8 +24985,8 @@ "en": "Start Time", "nl": "Start tijd", "xloc": [ - "default.handlebars->25->1686", - "default.handlebars->25->1705", + "default.handlebars->25->1689", + "default.handlebars->25->1708", "default.handlebars->25->700" ] }, @@ -25031,8 +25039,8 @@ "ru": "Статус", "zh-chs": "狀態", "xloc": [ - "default.handlebars->25->1637", - "default.handlebars->25->1698", + "default.handlebars->25->1640", + "default.handlebars->25->1701", "default.handlebars->container->column_l->p42->p42tbl->1->0->7" ] }, @@ -25584,7 +25592,7 @@ "xloc": [ "default-mobile.handlebars->9->162", "default.handlebars->25->1247", - "default.handlebars->25->1692", + "default.handlebars->25->1695", "default.handlebars->25->215", "default.handlebars->25->445", "default.handlebars->container->topbar->1->1->MainSubMenuSpan->MainSubMenu->1->0->MainDevTerminal", @@ -25623,7 +25631,7 @@ "zh-chs": "終端通知", "xloc": [ "default.handlebars->25->1167", - "default.handlebars->25->1605", + "default.handlebars->25->1608", "default.handlebars->25->515" ] }, @@ -25642,7 +25650,7 @@ "zh-chs": "終端提示", "xloc": [ "default.handlebars->25->1166", - "default.handlebars->25->1604", + "default.handlebars->25->1607", "default.handlebars->25->514" ] }, @@ -25786,7 +25794,7 @@ "ru": "На данный момент уведомлений нет", "zh-chs": "目前沒有任何通知", "xloc": [ - "default.handlebars->25->1713" + "default.handlebars->25->1716" ] }, { @@ -27019,9 +27027,9 @@ "default.handlebars->25->1144", "default.handlebars->25->1145", "default.handlebars->25->13", - "default.handlebars->25->1677", - "default.handlebars->25->1690", - "default.handlebars->25->1691", + "default.handlebars->25->1680", + "default.handlebars->25->1693", + "default.handlebars->25->1694", "default.handlebars->25->392", "default.handlebars->25->41", "default.handlebars->25->42", @@ -27066,7 +27074,7 @@ "ru": "Неизвестное действие", "zh-chs": "未知動作", "xloc": [ - "default.handlebars->25->1727" + "default.handlebars->25->1730" ] }, { @@ -27083,8 +27091,8 @@ "ru": "Неизвестное устройство", "zh-chs": "未知設備", "xloc": [ - "default.handlebars->25->1548", - "default.handlebars->25->1665" + "default.handlebars->25->1551", + "default.handlebars->25->1668" ] }, { @@ -27101,9 +27109,9 @@ "ru": "Неизвестная группа устройств", "zh-chs": "未知設備組", "xloc": [ - "default.handlebars->25->1542", - "default.handlebars->25->1653", - "default.handlebars->25->1731" + "default.handlebars->25->1545", + "default.handlebars->25->1656", + "default.handlebars->25->1734" ] }, { @@ -27120,7 +27128,7 @@ "ru": "Неизвестная группа", "zh-chs": "未知群組", "xloc": [ - "default.handlebars->25->1723" + "default.handlebars->25->1726" ] }, { @@ -27155,7 +27163,7 @@ "ru": "Неизвестная группа пользователей", "zh-chs": "未知用戶組", "xloc": [ - "default.handlebars->25->1659" + "default.handlebars->25->1662" ] }, { @@ -27244,7 +27252,7 @@ "ru": "Актуально", "zh-chs": "最新", "xloc": [ - "default.handlebars->25->1788" + "default.handlebars->25->1791" ] }, { @@ -27493,8 +27501,8 @@ "ru": "Использовано", "zh-chs": "用過的", "xloc": [ - "default.handlebars->25->1717", - "default.handlebars->25->1719" + "default.handlebars->25->1720", + "default.handlebars->25->1722" ] }, { @@ -27513,8 +27521,8 @@ "xloc": [ "default.handlebars->25->1205", "default.handlebars->25->1428", - "default.handlebars->25->1538", - "default.handlebars->25->1710", + "default.handlebars->25->1541", + "default.handlebars->25->1713", "default.handlebars->25->193", "default.handlebars->25->577" ] @@ -27570,7 +27578,7 @@ "ru": "Учетные записи пользователей", "zh-chs": "用戶帳號", "xloc": [ - "default.handlebars->25->1736" + "default.handlebars->25->1739" ] }, { @@ -27607,7 +27615,7 @@ "zh-chs": "用戶同意", "xloc": [ "default.handlebars->25->1173", - "default.handlebars->25->1611", + "default.handlebars->25->1614", "default.handlebars->25->521" ] }, @@ -27628,8 +27636,8 @@ "default.handlebars->25->1261", "default.handlebars->25->1262", "default.handlebars->25->1519", - "default.handlebars->25->1661", - "default.handlebars->25->1680", + "default.handlebars->25->1664", + "default.handlebars->25->1683", "default.handlebars->25->576" ] }, @@ -27664,7 +27672,7 @@ "ru": "Членство в группах пользователей", "zh-chs": "用戶組成員資格", "xloc": [ - "default.handlebars->25->1658" + "default.handlebars->25->1661" ] }, { @@ -27689,8 +27697,8 @@ "zh-chs": "用戶標識", "xloc": [ "default.handlebars->25->1322", - "default.handlebars->25->1580", - "default.handlebars->25->1581" + "default.handlebars->25->1583", + "default.handlebars->25->1584" ] }, { @@ -27698,7 +27706,7 @@ "nl": "Gebruikers-ID's", "xloc": [ "default.handlebars->25->1259", - "default.handlebars->25->1567" + "default.handlebars->25->1570" ] }, { @@ -27795,7 +27803,7 @@ "ru": "Сессии пользователя", "zh-chs": "用戶會話", "xloc": [ - "default.handlebars->25->1753" + "default.handlebars->25->1756" ] }, { @@ -27990,8 +27998,8 @@ "zh-chs": "用戶數", "xloc": [ "default.handlebars->25->1507", - "default.handlebars->25->1530", - "default.handlebars->25->1752", + "default.handlebars->25->1533", + "default.handlebars->25->1755", "default.handlebars->container->topbar->1->1->UsersSubMenuSpan->UsersSubMenu->1->0->UsersGeneral" ] }, @@ -28009,7 +28017,7 @@ "ru": "Сессии пользователей", "zh-chs": "用戶會話", "xloc": [ - "default.handlebars->25->1740" + "default.handlebars->25->1743" ] }, { @@ -28094,7 +28102,7 @@ "ru": "Проверенный", "zh-chs": "已驗證", "xloc": [ - "default.handlebars->25->1639" + "default.handlebars->25->1642" ] }, { @@ -28198,7 +28206,7 @@ "ru": "Версия несовместима, пожалуйста, сначала обновите установку MeshCentral", "zh-chs": "版本不兼容,请先升级您的MeshCentral安装", "xloc": [ - "default.handlebars->25->1784" + "default.handlebars->25->1787" ] }, { @@ -28266,8 +28274,8 @@ "ru": "Просмотр журнала изменений", "zh-chs": "查看变更日志", "xloc": [ - "default.handlebars->25->1787", - "default.handlebars->25->1789" + "default.handlebars->25->1790", + "default.handlebars->25->1792" ] }, { @@ -28318,7 +28326,7 @@ "ru": "Посмотреть примечания об этом пользователе", "zh-chs": "查看有關此用戶的註釋", "xloc": [ - "default.handlebars->25->1619" + "default.handlebars->25->1622" ] }, { @@ -28525,8 +28533,8 @@ "ru": "Веб-сервер", "zh-chs": "網絡服務器", "xloc": [ - "default.handlebars->25->1773", - "default.handlebars->25->1774" + "default.handlebars->25->1776", + "default.handlebars->25->1777" ] }, { @@ -28543,7 +28551,7 @@ "ru": "Запросы веб-сервера", "zh-chs": "Web服務器請求", "xloc": [ - "default.handlebars->25->1775" + "default.handlebars->25->1778" ] }, { @@ -28560,7 +28568,7 @@ "ru": "Ретранслятор Web Socket", "zh-chs": "Web套接字中繼", "xloc": [ - "default.handlebars->25->1776" + "default.handlebars->25->1779" ] }, { @@ -28665,7 +28673,7 @@ "ru": "Будет изменено при следующем входе в систему.", "zh-chs": "下次登錄時將更改。", "xloc": [ - "default.handlebars->25->1591" + "default.handlebars->25->1594" ] }, { @@ -29618,7 +29626,7 @@ "ru": "\\\\'", "zh-chs": "\\\\'", "xloc": [ - "default.handlebars->25->1785" + "default.handlebars->25->1788" ] }, { @@ -29893,7 +29901,7 @@ "ru": "свободно", "zh-chs": "自由", "xloc": [ - "default.handlebars->25->1748" + "default.handlebars->25->1751" ] }, { @@ -30263,7 +30271,7 @@ "ru": "servertrace.csv", "zh-chs": "servertrace.csv", "xloc": [ - "default.handlebars->25->1783" + "default.handlebars->25->1786" ] }, { @@ -30320,7 +30328,7 @@ "ru": "time, conn.agent, conn.users, conn.usersessions, conn.relaysession, conn.intelamt, mem.external, mem.heapused, mem.heaptotal, mem.rss", "zh-chs": "時間,conn.agent,conn.users,conn.usersessions,conn.relaysession,conn.intelamt,mem.external,mem.heapused,mem.heaptotal,mem.rss", "xloc": [ - "default.handlebars->25->1761" + "default.handlebars->25->1764" ] }, { @@ -30337,7 +30345,7 @@ "ru": "time, source, message", "zh-chs": "時間,來源,訊息", "xloc": [ - "default.handlebars->25->1782" + "default.handlebars->25->1785" ] }, { @@ -30368,7 +30376,7 @@ "ru": "всего", "zh-chs": "總", "xloc": [ - "default.handlebars->25->1749" + "default.handlebars->25->1752" ] }, { @@ -30527,7 +30535,7 @@ "zh-chs": "{0} Kb", "xloc": [ "default.handlebars->25->1375", - "default.handlebars->25->1689" + "default.handlebars->25->1692" ] }, { @@ -30581,7 +30589,7 @@ "ru": "{0} активных сессий", "zh-chs": "{0}個活動會話", "xloc": [ - "default.handlebars->25->1631" + "default.handlebars->25->1634" ] }, { @@ -30617,7 +30625,7 @@ "xloc": [ "default-mobile.handlebars->9->119", "default.handlebars->25->1385", - "default.handlebars->25->1704" + "default.handlebars->25->1707" ] }, { @@ -30675,7 +30683,7 @@ "ru": "{0} групп", "zh-chs": "{0}個群組", "xloc": [ - "default.handlebars->25->1596" + "default.handlebars->25->1599" ] }, { @@ -31255,4 +31263,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/views/default.handlebars b/views/default.handlebars index 2289965a..9329f29d 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2407,7 +2407,7 @@ } case 'createmesh': { // A new mesh was created - if ((meshes[message.event.meshid] == null) && ((userinfo.manageAllDeviceGroups) || (message.event.links[userinfo._id] != null))) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some. + if ((meshes[message.event.meshid] == null) && ((serverinfo.manageAllDeviceGroups) || (message.event.links[userinfo._id] != null))) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some. meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links }; masterUpdate(4 + 128 + 8192 + 16384); meshserver.send({ action: 'files' }); @@ -2873,8 +2873,10 @@ go(xviewmode); goBackStack.push(4); } else if (args.gotougrp != null) { - if ((usergroups == null) || usergroups['ugrp/' + domain + '/' + args.gotougrp] == null) return; // This user group is not loaded yet - gotoUserGroup('ugrp/' + domain + '/' + args.gotougrp); + var xusergrpid = args.gotougrp; + if (args.gotougrp.indexOf('/') < 0) { xusergrpid = 'ugrp/' + domain + '/' + args.gotougrp; } + if ((usergroups == null) || usergroups[xusergrpid] == null) return; // This user group is not loaded yet + gotoUserGroup(xusergrpid); go(xviewmode); goBackStack.push(50); } else if (!isNaN(xviewmode)) { @@ -5300,7 +5302,10 @@ x += ' ' + "Add User" + ''; if (usergroups != null) { var userGroupCount = 0, newUserGroup = false; - for (var i in usergroups) { userGroupCount++; if ((currentNode.links == null) || (currentNode.links[i] == null)) { newUserGroup = true; } } + for (var i in usergroups) { + if (usergroups[i]._id.split('/')[1] != nodeid.split('/')[1]) continue; + userGroupCount++; if ((currentNode.links == null) || (currentNode.links[i] == null)) { newUserGroup = true; } + } if ((userGroupCount > 0) && (newUserGroup)) { x += ' ' + "Add User Group" + ''; } } } @@ -8671,7 +8676,11 @@ x += ' ' + "Add Users" + ''; if (usergroups != null) { var userGroupCount = 0, newUserGroup = false; - for (var i in usergroups) { userGroupCount++; if ((currentMesh.links == null) || (currentMesh.links[i] == null)) { newUserGroup = true; } } + for (var i in usergroups) { + if (usergroups[i]._id.split('/')[1] != currentMesh._id.split('/')[1]) continue; + userGroupCount++; + if ((currentMesh.links == null) || (currentMesh.links[i] == null)) { newUserGroup = true; } + } if ((userGroupCount > 0) && (newUserGroup)) { x += ' ' + "Add User Group" + ''; } } } @@ -8914,6 +8923,7 @@ } function p20showAddMeshUserDialog(userid, selected) { + console.log('p20showAddMeshUserDialog', userid, selected); if (xxdialogMode) return false; var x = ''; if ((userid == null) || (userid == 5)) { @@ -8939,14 +8949,20 @@ if (usergroups == null) return; var y = ''; var ousergroups = getOrderedList(usergroups, 'name'); - for (var i in ousergroups) { if ((currentMesh.links == null) || (currentMesh.links[ousergroups[i]._id] == null)) { y += ''; } } + for (var i in ousergroups) { + if (currentMesh._id.split('/')[1] != ousergroups[i]._id.split('/')[1]) continue; + if ((currentMesh.links == null) || (currentMesh.links[ousergroups[i]._id] == null)) { y += ''; } + } x += addHtmlValue("User Group", '
'); } else if (userid == 6) { if (usergroups == null) return; var y = ''; if (selected == null) { var ousergroups = getOrderedList(usergroups, 'name'); - for (var i in ousergroups) { if ((currentNode.links == null) || (currentNode.links[ousergroups[i]._id] == null)) { y += ''; } } + for (var i in ousergroups) { + if (currentNode._id.split('/')[1] != ousergroups[i]._id.split('/')[1]) continue; + if ((currentNode.links == null) || (currentNode.links[ousergroups[i]._id] == null)) { y += ''; } + } } else { y += ''; } @@ -9149,7 +9165,10 @@ var lastuser = xusers[xusers.length - 1].trim(), lastuserl = lastuser.toLowerCase(), matchingUsers = []; if (lastuser.length > 0) { for (var i in users) { - if (users[i].name === lastuser) { exactMatch = true; break; } + var userSplit = users[i]._id.split('/'); + if ((currentMesh != null) && (currentMesh.domain != userSplit[1])) continue; + if ((currentNode != null) && (currentNode.domain != userSplit[1])) continue; + if (userSplit[2] === lastuserl) { exactMatch = true; break; } if (users[i].name.toLowerCase().indexOf(lastuserl) >= 0) { matchingUsers.push([users[i]._id, users[i].name]); if (matchingUsers.length >= 8) break; } } if ((exactMatch == false) && (matchingUsers.length > 0)) { @@ -10075,7 +10094,7 @@ } // If we are a cross-domain administrator, add the domain. - if ((userinfo.crossDomain != null)) { + if ((serverinfo.crossDomain != null)) { var userdomain = user._id.split('/')[1]; if (userdomain != '') { username += ', ' + userdomain + ''; } } @@ -10297,9 +10316,9 @@ if (xxdialogMode) return; var x = ''; - if (userinfo.crossDomain) { + if (serverinfo.crossDomain) { var y = ''; x += addHtmlValue("Domain", y); } @@ -10361,7 +10380,7 @@ x.emailVerified = Q('p4verifiedEmail').checked; x.emailInvitation = Q('p4invitationEmail').checked; } - if (userinfo.crossDomain) { x.domain = userinfo.crossDomain[parseInt(Q('p4domain').value)]; } + if (serverinfo.crossDomain) { x.domain = serverinfo.crossDomain[parseInt(Q('p4domain').value)]; } meshserver.send(x); } @@ -10522,12 +10541,20 @@ function addUserGroupHtml(group) { var usercount = 0, meshcount = 0, devicecount = 0; if (group.links) { for (var i in group.links) { if (i.startsWith('user/')) { usercount++; } if (i.startsWith('mesh/')) { meshcount++; } if (i.startsWith('node/')) { devicecount++; } } } + + // Group name, if we are a cross-domain administrator, add the domain. + var name = EscapeHtml(group.name); + if ((serverinfo.crossDomain != null)) { + var grpdomain = group._id.split('/')[1]; + if (grpdomain != '') { name += ', ' + EscapeHtml(grpdomain) + ''; } + } + var x = ''; x += '
'; x += '
'; x += '
'; x += '
'; - x += '
' + group.name + '
' + usercount + '' + meshcount + '' + devicecount; + x += '
' + name + '
' + usercount + '' + meshcount + '' + devicecount; return x; } @@ -10586,6 +10613,12 @@ if (usergroups) { for (var i in usergroups) { y += ''; } } x += addHtmlValue("User Group", '
'); } + if ((mode == 1) && (serverinfo.crossDomain)) { + var y = ''; + x += addHtmlValue("Domain", y); + } x += addHtmlValue("Name", ''); x += addHtmlValue("Description", ''); setDialogMode(2, (mode == 1)?"Create User Group":"Duplicate User Group", 3, showCreateUserGroupDialogEx, x, mode); @@ -10598,6 +10631,7 @@ function showCreateUserGroupDialogEx(b, mode) { var x = { action: 'createusergroup', name: Q('p4name').value, desc: Q('p4desc').value }; if (mode == 2) { x.clone = decodeURIComponent(Q('dp4groupid').value); } + if ((mode == 1) && (serverinfo.crossDomain)) { x.domain = serverinfo.crossDomain[parseInt(Q('p4domain').value)]; } meshserver.send(x); } @@ -10635,6 +10669,8 @@ } else { x += addDeviceAttribute("Description", desc); } + + if (serverinfo.crossDomain != null) { x += addDeviceAttribute("Group Identifier", group._id); } x += addDeviceAttribute("Users", usercount); x += addDeviceAttribute("Device Groups", meshcount); x += addDeviceAttribute("Devices", devicecount); @@ -10681,7 +10717,7 @@ // Display all device groups for this user group count = 1; var deviceGroupCount = 0, newDeviceGroup = false; - for (var i in meshes) { deviceGroupCount++; if ((currentUserGroup.links == null) || (currentUserGroup.links[i] == null)) { newDeviceGroup = true; } } + for (var i in meshes) { if (currentUserGroup._id.split('/')[1] != meshes[i]._id.split('/')[1]) continue; deviceGroupCount++; if ((currentUserGroup.links == null) || (currentUserGroup.links[i] == null)) { newDeviceGroup = true; } } if ((deviceGroupCount > 0) && (newDeviceGroup)) { x += ' ' + "Add Device Group" + ''; } x += ''; if (currentUserGroup.links) { @@ -10705,7 +10741,8 @@ // Display all devices for this user group count = 1; - x += '
' + "Add Device" + ''; + x += '
'; + if (currentUserGroup._id.split('/')[1] == userinfo._id.split('/')[1]) { x += ' ' + "Add Device" + ''; } x += '
' + "Common Device Groups" + '
'; if (currentUserGroup.links) { var onodes = []; @@ -10735,7 +10772,7 @@ // Change the URL var urlviewmode = ''; if (((features & 0x10000000) == 0) && (xxcurrentView >= 51) && (xxcurrentView <= 59) && (currentUserGroup != null)) { - urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + currentUserGroup._id.split('/')[2]; + urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + ((serverinfo.crossDomain)?currentUserGroup._id:currentUserGroup._id.split('/')[2]); for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); } try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { } } @@ -10839,9 +10876,7 @@ } function p51validateAddUserDialog() { - var meshrights = GetMeshRights(currentMesh); var ok = true; - if (Q('dp51username')) { var xusers = Q('dp51username').value.split(','); for (var i in xusers) { @@ -10855,8 +10890,9 @@ var lastuser = xusers[xusers.length - 1].trim(), lastuserl = lastuser.toLowerCase(), matchingUsers = []; if (lastuser.length > 0) { for (var i in users) { - if (users[i].name === lastuser) { exactMatch = true; break; } - if (users[i].name.toLowerCase().indexOf(lastuserl) >= 0) { matchingUsers.push([users[i]._id, users[i].name]); if (matchingUsers.length >= 8) break; } + var userSplit = users[i]._id.split('/'); + if ((currentUserGroup.domain == userSplit[1]) && (userSplit[2] === lastuserl)) { exactMatch = true; break; } + if ((users[i].name.toLowerCase().indexOf(lastuserl) >= 0) && (currentUserGroup.domain == userSplit[1])) { matchingUsers.push([users[i]._id, users[i].name]); if (matchingUsers.length >= 8) break; } } if ((exactMatch == false) && (matchingUsers.length > 0)) { var x = ''; @@ -10934,7 +10970,7 @@ var email = user.email?EscapeHtml(user.email):'' + "Not set" + '', everify = ''; if (serverinfo.emailcheck) { everify = ((user.emailVerified == true) ? ' ' : ' '); } - if (userinfo.crossDomain) { + if (serverinfo.crossDomain) { x += addDeviceAttribute("User Identifier", EscapeHtml(user._id)); } else { if (user.name.toLowerCase() != user._id.split('/')[2]) { x += addDeviceAttribute("User Identifier", EscapeHtml(user._id.split('/')[2])); } @@ -11039,7 +11075,7 @@ // Change the URL var urlviewmode = ''; if (((features & 0x10000000) == 0) && (xxcurrentView >= 30) && (xxcurrentView <= 39) && (currentUser != null)) { - urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + ((userinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]); + urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + ((serverinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]); for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); } try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { } } @@ -11150,7 +11186,7 @@ // Display common device groups var deviceGroupCount = 0, newDeviceGroup = false; - for (var i in meshes) { deviceGroupCount++; if ((currentUser.links == null) || (currentUser.links[i] == null)) { newDeviceGroup = true; } } + for (var i in meshes) { if (meshes[i]._id.split('/')[1] != currentUser._id.split('/')[1]) continue; deviceGroupCount++; if ((currentUser.links == null) || (currentUser.links[i] == null)) { newDeviceGroup = true; } } if ((deviceGroupCount > 0) && (newDeviceGroup)) { x += ' ' + "Add Device Group" + ''; } x += '
' + "Common Devices" + '
'; if (currentUser.links) { @@ -11179,7 +11215,11 @@ x += '
'; if ((userinfo.siteadmin & 256) != 0) { var userGroupCount = 0, newUserGroup = false; - for (var i in usergroups) { userGroupCount++; if ((currentUser.links == null) || (currentUser.links[i] == null)) { newUserGroup = true; } } + for (var i in usergroups) { + if (usergroups[i]._id.split('/')[1] != currentUser._id.split('/')[1]) continue; + userGroupCount++; + if ((currentUser.links == null) || (currentUser.links[i] == null)) { newUserGroup = true; } + } if ((userGroupCount > 0) && (newUserGroup)) { x += ' ' + "Add User Group" + ''; } } x += '
' + "Common Device Groups" + '
'; @@ -11204,7 +11244,8 @@ // Display common devices count = 1; - x += '
' + "Add Device" + ''; + x += '
'; + if (currentUser._id.split('/')[1] == userinfo._id.split('/')[1]) { x += ' ' + "Add Device" + ''; } x += '
' + "User Group Memberships" + '
'; if (currentUser.links) { // Sort the list of devices to display @@ -11262,7 +11303,10 @@ function p30showAddUserGroupDialog() { if (xxdialogMode || (usergroups == null)) return; var y = ''; - for (var i in usergroups) { if ((currentUser.links == null) || (currentUser.links[i] == null)) { y += ''; } } + for (var i in usergroups) { + if (usergroups[i]._id.split('/')[1] != currentUser._id.split('/')[1]) continue; + if ((currentUser.links == null) || (currentUser.links[i] == null)) { y += ''; } + } var x = addHtmlValue("User Group", '
'); setDialogMode(2, "Add Membership", 3, p30showAddUserGroupDialogEx, x); Q('dp2groupid').focus(); @@ -12027,9 +12071,9 @@ } else if ((x >= 20) && (x <= 29)) { if (currentMesh) { window.open(window.location.origin + '{{{domainurl}}}' + '?gotomesh=' + currentMesh._id.split('/')[2] + '&viewmode=' + x + '&hide=16', 'meshcentral:' + currentMesh._id); } } else if ((x >= 30) && (x <= 39)) { - if (currentUser) { window.open(window.location.origin + '{{{domainurl}}}' + '?gotouser=' + ((userinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]) + '&viewmode=' + x + '&hide=16', 'meshcentral:' + currentUser._id); } + if (currentUser) { window.open(window.location.origin + '{{{domainurl}}}' + '?gotouser=' + ((serverinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]) + '&viewmode=' + x + '&hide=16', 'meshcentral:' + currentUser._id); } } else if ((x >= 50) && (x <= 59)) { - if (currentUserGroup) { window.open(window.location.origin + '{{{domainurl}}}' + '?gotougrp=' + currentUserGroup._id.split('/')[2] + '&viewmode=' + x + '&hide=16', 'meshcentral:' + currentUserGroup._id); } + if (currentUserGroup) { window.open(window.location.origin + '{{{domainurl}}}' + '?gotougrp=' + ((serverinfo.crossDomain)?currentUserGroup._id:currentUserGroup._id.split('/')[2]) + '&viewmode=' + x + '&hide=16', 'meshcentral:' + currentUserGroup._id); } } else { // if (x < 10)) window.open(window.location.origin + '{{{domainurl}}}' + '?viewmode=' + x + '&hide=0', 'meshcentral:' + x); } @@ -12066,9 +12110,9 @@ } else if ((xxcurrentView >= 20) && (xxcurrentView <= 29)) { // Device Group Link if (currentMesh != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotomesh=' + currentMesh._id.split('/')[2]; } } else if ((xxcurrentView >= 30) && (xxcurrentView <= 39)) { // User Link - if (currentUser != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + ((userinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]); } + if (currentUser != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + ((serverinfo.crossDomain)?currentUser._id:currentUser._id.split('/')[2]); } } else if ((xxcurrentView >= 51) && (xxcurrentView <= 51)) { // User Group Link - if ((currentUserGroup != null) && (currentUserGroup._id != null)) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + currentUserGroup._id.split('/')[2]; } + if ((currentUserGroup != null) && (currentUserGroup._id != null)) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + ((serverinfo.crossDomain)?currentUserGroup._id:currentUserGroup._id.split('/')[2]); } } else if (xxcurrentView > 1) { urlviewmode = '?viewmode=' + xxcurrentView; } for (var i in urlargs) { urlviewmode += (((urlviewmode == '')?'?':'&') + i + '=' + urlargs[i]); } try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { } @@ -12344,7 +12388,7 @@ if ((mesh == null) || (mesh.links == null)) { return 0; } // Check if super user - if (userinfo.manageAllDeviceGroups) return 0xFFFFFFFF; + if (serverinfo.manageAllDeviceGroups) return 0xFFFFFFFF; // Check device group link permission var rights = 0, r = mesh.links[userid]; @@ -12380,7 +12424,7 @@ if (mesh.links[userid] != null) { return true; } // User has visilibity thru a direct link // Check if user user - if (userinfo.manageAllDeviceGroups) return true; + if (serverinfo.manageAllDeviceGroups) return true; // Check permissions thru user groups var user = null;
' + "Common Devices" + '