Fixed desktop input when user as only device rights.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-02 11:26:54 -07:00
parent d9ac60cad3
commit 633f31b78d
3 changed files with 5 additions and 5 deletions

View File

@ -687,7 +687,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
device = nodes[0];
// This device exists, meshid given by the device must be ignored, use the server side one.
if (device.meshid != obj.dbMeshKey) {
if ((device.meshid != null) && (device.meshid != obj.dbMeshKey)) {
obj.dbMeshKey = device.meshid;
obj.meshid = device.meshid.split('/')[2];
}

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.5.0-z",
"version": "0.5.1-a",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -2777,7 +2777,7 @@
if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
// Check what keys we are allows to send
if (currentNode != null) {
var meshrights = GetMeshRights(currentNode.meshid);
var meshrights = GetNodeRights(currentNode);
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
if (inputAllowed == false) return false;
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
@ -2836,7 +2836,7 @@
if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
// Check what keys we are allows to send
if (currentNode != null) {
var meshrights = GetMeshRights(currentNode.meshid);
var meshrights = GetNodeRights(currentNode);
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
if (inputAllowed == false) return false;
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
@ -2870,7 +2870,7 @@
if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
// Check what keys we are allows to send
if (currentNode != null) {
var meshrights = GetMeshRights(currentNode.meshid);
var meshrights = GetNodeRights(currentNode);
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
if (inputAllowed == false) return false;
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));