diff --git a/agents/meshcore.js b/agents/meshcore.js index 1a668e1e..1021f5b3 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -874,7 +874,7 @@ function handleServerCommand(data) { case 'msg': { switch (data.type) { case 'console': { // Process a console command - if ((typeof data.rights != 'number') || ((data.rights & 16) == 0)) break; // Check console rights + if ((typeof data.rights != 'number') || ((data.rights & 8) == 0) || ((data.rights & 16) == 0)) break; // Check console rights (Remote Control and Console) if (data.value && data.sessionid) { MeshServerLogEx(17, [data.value], "Processing console command: " + data.value, data); var args = splitArgs(data.value); diff --git a/agents/recoverycore.js b/agents/recoverycore.js index 215e14c8..71d51590 100644 --- a/agents/recoverycore.js +++ b/agents/recoverycore.js @@ -911,7 +911,7 @@ require('MeshAgent').AddCommandHandler(function (data) { { switch (data.type) { case 'console': { // Process a console command - if ((typeof data.rights != 'number') || ((data.rights & 16) == 0)) break; // Check console rights + if ((typeof data.rights != 'number') || ((data.rights & 8) == 0) || ((data.rights & 16) == 0)) break; // Check console rights (Remote Control and Console) if (data.value && data.sessionid) { var args = splitArgs(data.value); processConsoleCommand(args[0].toLowerCase(), parseArgs(args), data.rights, data.sessionid); diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index d7df88ad..ced2ca91 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -6363,11 +6363,16 @@ function removeUserRights(rights, userid) { if ((userid != userinfo._id) || (userinfo.removeRights == null)) return rights; var add = 0, substract = 0; + if ((userinfo.removeRights & 0x00000008) != 0) { substract += 0x00000008; } // No Remote Control if ((userinfo.removeRights & 0x00010000) != 0) { add += 0x00010000; } // No Desktop if ((userinfo.removeRights & 0x00000100) != 0) { add += 0x00000100; } // Desktop View Only if ((userinfo.removeRights & 0x00000200) != 0) { add += 0x00000200; } // No Terminal if ((userinfo.removeRights & 0x00000400) != 0) { add += 0x00000400; } // No Files if ((userinfo.removeRights & 0x00000010) != 0) { substract += 0x00000010; } // No Console + if ((userinfo.removeRights & 0x00008000) != 0) { substract += 0x00008000; } // No Uninstall + if ((userinfo.removeRights & 0x00020000) != 0) { substract += 0x00020000; } // No Remote Command + if ((userinfo.removeRights & 0x00000040) != 0) { substract += 0x00000040; } // No Wake + if ((userinfo.removeRights & 0x00040000) != 0) { substract += 0x00040000; } // No Reset/Off if (rights != 0xFFFFFFFF) { // If not administrator, add and subsctract restrictions rights |= add; diff --git a/views/default.handlebars b/views/default.handlebars index 29aba88e..fac89fce 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -14073,11 +14073,17 @@ var userFeatures = []; if ((serverinfo.usersSessionRecording == 1) && (user.flags) && (user.flags & 2)) { userFeatures.push("Record Sessions"); } if (user.removeRights) { - if ((user.removeRights & 0x00010000) != 0) { userFeatures.push("No Desktop"); } - else if ((user.removeRights & 0x00000100) != 0) { userFeatures.push("Desktop View Only"); } - if ((user.removeRights & 0x00000200) != 0) { userFeatures.push("No Terminal"); } - if ((user.removeRights & 0x00000400) != 0) { userFeatures.push("No Files"); } + if ((user.removeRights & 0x00000008) != 0) { userFeatures.push("No Remote Control"); } else { + if ((user.removeRights & 0x00010000) != 0) { userFeatures.push("No Desktop"); } + else if ((user.removeRights & 0x00000100) != 0) { userFeatures.push("Desktop View Only"); } + if ((user.removeRights & 0x00000200) != 0) { userFeatures.push("No Terminal"); } + if ((user.removeRights & 0x00000400) != 0) { userFeatures.push("No Files"); } + } if ((user.removeRights & 0x00000010) != 0) { userFeatures.push("No Console"); } + if ((user.removeRights & 0x00008000) != 0) { userFeatures.push("No Uninstall"); } + if ((user.removeRights & 0x00020000) != 0) { userFeatures.push("No Remote Command"); } + if ((user.removeRights & 0x00000040) != 0) { userFeatures.push("No Wake"); } + if ((user.removeRights & 0x00040000) != 0) { userFeatures.push("No Reset/Off"); } } userFeatures = userFeatures.join(', '); if (userFeatures == '') { userFeatures = '' + "None" + ''; } @@ -14204,17 +14210,25 @@ if (serverinfo.usersSessionRecording == 1) { x += '