mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:23:39 +03:00
Geolocation features now disabled by default.
This commit is contained in:
parent
50684bb447
commit
a46ec3c02c
10
meshuser.js
10
meshuser.js
@ -317,6 +317,14 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
// Remove Intel AMT credential if present
|
||||
if (docs[i].intelamt != null && docs[i].intelamt.pass != null) { delete docs[i].intelamt.pass; }
|
||||
|
||||
// If GeoLocation not enabled, remove any node location information
|
||||
if (domain.geolocation != true) {
|
||||
if (docs[i].iploc != null) { delete docs[i].iploc; }
|
||||
if (docs[i].wifiloc != null) { delete docs[i].wifiloc; }
|
||||
if (docs[i].gpsloc != null) { delete docs[i].gpsloc; }
|
||||
if (docs[i].userloc != null) { delete docs[i].userloc; }
|
||||
}
|
||||
|
||||
r[meshid].push(docs[i]);
|
||||
}
|
||||
try { ws.send(JSON.stringify({ action: 'nodes', nodes: r, tag: command.tag })); } catch (ex) { }
|
||||
@ -1482,7 +1490,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
if (command.icon && (command.icon != node.icon)) { change = 1; node.icon = command.icon; changes.push('icon'); }
|
||||
if (command.name && (command.name != node.name)) { change = 1; node.name = command.name; changes.push('name'); }
|
||||
if (command.host && (command.host != node.host)) { change = 1; node.host = command.host; changes.push('host'); }
|
||||
if (command.userloc && ((node.userloc == null) || (command.userloc[0] != node.userloc[0]) || (command.userloc[1] != node.userloc[1]))) {
|
||||
if (domain.geolocation && command.userloc && ((node.userloc == null) || (command.userloc[0] != node.userloc[0]) || (command.userloc[1] != node.userloc[1]))) {
|
||||
change = 1;
|
||||
if ((command.userloc.length == 0) && (node.userloc)) {
|
||||
delete node.userloc;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.2.9-d",
|
||||
"version": "0.2.9-e",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
@ -50,6 +50,7 @@
|
||||
"_CertUrl": "https://192.168.2.106:443/",
|
||||
"_PasswordRequirements": { "min": 8, "max": 128, "upper": 1, "lower": 1, "numeric": 1, "nonalpha": 1 },
|
||||
"_AgentNoProxy": true,
|
||||
"_GeoLocation": true,
|
||||
"_UserAllowedIP": "127.0.0.1,192.168.1.0/24",
|
||||
"_UserBlockedIP": "127.0.0.1,::1,192.168.0.100",
|
||||
"_AgentAllowedIP": "192.168.0.100/24",
|
||||
|
@ -2866,6 +2866,7 @@
|
||||
// Load the entire map
|
||||
function loadmap() {
|
||||
if (xxmap == null) return;
|
||||
if ((features & 0x8000) == 0) { QV('viewselectmapoption', false); QV('devViewButton4', false); xxmap = null; return; } // Geolocation not supported
|
||||
try {
|
||||
// Initialize a Source Vector
|
||||
xxmap.markersSource = new ol.source.Vector();
|
||||
@ -3547,7 +3548,6 @@
|
||||
x += '</div><div style=font-size:x-small>';
|
||||
if (mesh.mtype == 2) x += '<a style=cursor:pointer onclick=p10showNodeNetInfoDialog("' + node._id + '") title="Show device network interface information">Interfaces</a> ';
|
||||
if (xxmap != null) x += '<a style=cursor:pointer onclick=p10showNodeLocationDialog("' + node._id + '") title="Show device locations information">Location</a> ';
|
||||
|
||||
if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += '<a style=cursor:pointer onclick=p10showMeshCmdDialog(1,"' + node._id + '") title="Traffic router used to connect to a device thru this server.">Router</a> ';
|
||||
|
||||
// RDP link, show this link only of the remote machine is Windows.
|
||||
|
@ -999,6 +999,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
if ((domain.auth != 'sspi') && (obj.parent.certificates.CommonName != 'un-configured') && (obj.args.nousers !== true)) { features += 0x1000; } // 2-step login supported
|
||||
if (domain.agentnoproxy === true) { features += 0x2000; } // Indicates that agents should be installed without using a HTTP proxy
|
||||
if (domain.yubikey && domain.yubikey.id && domain.yubikey.secret) { features += 0x4000; } // Indicates Yubikey support
|
||||
if (domain.geolocation == true) { features += 0x8000; } // Enable geo-location features
|
||||
|
||||
// Create a authentication cookie
|
||||
const authCookie = obj.parent.encodeCookie({ userid: user._id, domainid: domain.id }, obj.parent.loginCookieEncryptionKey);
|
||||
|
Loading…
Reference in New Issue
Block a user