mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 22:55:52 -05:00
Added options to remove the SSH Connect and SFTP connect from the terminal and files tab when other options exist, #4214
This commit is contained in:
parent
6f11af7cf4
commit
e89effac46
@ -616,10 +616,18 @@
|
||||
"MaxSingleUserSessions": { "type": "integer", "default": null, "description": "Maximum number of sessions a single user can have. Each time a user opens a new browser tab or opens a new browser on a different computer, a new user session is created." }
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"type": "object",
|
||||
"description": "Values that affect the files feature",
|
||||
"properties": {
|
||||
"sftpConnect" : { "type": "boolean", "default": true, "description": "When false, removes the 'SFTP Connect' button from the files tab unless this is the only possible option." }
|
||||
}
|
||||
},
|
||||
"terminal": {
|
||||
"type": "object",
|
||||
"description": "Values that affect the terminal feature",
|
||||
"properties": {
|
||||
"sshConnect" : { "type": "boolean", "default": true, "description": "When false, removes the 'SSH Connect' button from the terminal tab unless this is the only possible option." },
|
||||
"linuxShell": {
|
||||
"type": "string",
|
||||
"enum": [ "any", "root", "user", "login" ],
|
||||
@ -637,7 +645,7 @@
|
||||
},
|
||||
"desktop": {
|
||||
"type": "object",
|
||||
"description": "Values that affect the remote desktop feature",
|
||||
"description": "Values that affect the desktop feature",
|
||||
"properties": {
|
||||
"viewonly": {
|
||||
"type": "boolean",
|
||||
|
@ -9726,7 +9726,7 @@
|
||||
// Show the right buttons
|
||||
QV('disconnectbutton2span', (termState == true));
|
||||
QV('connectbutton2span', (termState == false) && (terminalNode.agent != null) && (terminalNode.agent.caps & 2) && (terminalNode.mtype != 3));
|
||||
QV('connectbutton2sspan', (features2 & 0x00000200) && (termState == false) && (terminalNode.agent != null) && (terminalNode.agent.caps & 2) && (terminalNode.agent.id != 3) && (terminalNode.agent.id != 4));
|
||||
QV('connectbutton2sspan', (features2 & 0x00000200) && (termState == false) && (terminalNode.agent != null) && (terminalNode.agent.caps & 2) && (terminalNode.agent.id != 3) && (terminalNode.agent.id != 4) && ((features2 & 0x1000000) == 0));
|
||||
if (terminalNode.mtype == 1) {
|
||||
QV('connectbutton2hspan', (termState == false) && (terminalNode.intelamt != null) && (terminalNode.intelamt.state == 2));
|
||||
QV('terminalSizeDropDown', (termState == false) && (terminalNode.intelamt != null) && (terminalNode.intelamt.state == 2));
|
||||
@ -10160,7 +10160,7 @@
|
||||
QE('p13Connect', online);
|
||||
QE('p13Connects', online);
|
||||
QV('p13Connect', (files == null) && (filesNode.mtype == 2));
|
||||
QV('p13Connects', (files == null) && (filesNode.agent != null) && (filesNode.agent.id != 3) && (filesNode.agent.id != 4));
|
||||
QV('p13Connects', (features2 & 0x200) && (files == null) && (filesNode.agent != null) && (filesNode.agent.id != 3) && (filesNode.agent.id != 4) && ((features2 & 0x800000) == 0));
|
||||
QV('p13Disconnect', files != null);
|
||||
if (((samenode == false) || (online == false)) && files) { files.Stop(); files = null; }
|
||||
p13setActions();
|
||||
|
@ -2977,6 +2977,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
if (domain.nightmode === 1) { features2 += 0x00100000; } // Always night mode
|
||||
if (domain.nightmode === 2) { features2 += 0x00200000; } // Always day mode
|
||||
if (domain.allowsavingdevicecredentials == false) { features2 += 0x00400000; } // Do not allow device credentials to be saved on the server
|
||||
if ((typeof domain.files == 'object') && (domain.files.sftpconnect === false)) { features2 += 0x00800000; } // Remove the "SFTP Connect" button in the "Files" tab when the device is agent managed
|
||||
if ((typeof domain.terminal == 'object') && (domain.terminal.sshconnect === false)) { features2 += 0x01000000; } // Remove the "SSH Connect" button in the "Terminal" tab when the device is agent managed
|
||||
return { features: features, features2: features2 };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user