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 d48f0b549f
commit 03ec8043ca
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]; device = nodes[0];
// This device exists, meshid given by the device must be ignored, use the server side one. // 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.dbMeshKey = device.meshid;
obj.meshid = device.meshid.split('/')[2]; obj.meshid = device.meshid.split('/')[2];
} }

View File

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

View File

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