mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improvements to show config option in MyServer tab.
This commit is contained in:
parent
0e671bbe81
commit
3a3663bb55
6 changed files with 29 additions and 18 deletions
|
@ -6513,10 +6513,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
}
|
||||
|
||||
function serverCommandServerConfig(command) {
|
||||
// Load the server config
|
||||
var configFilePath = common.joinPath(parent.parent.datapath, (parent.parent.args.configfile ? parent.parent.args.configfile : 'config.json'));
|
||||
if (userHasSiteUpdate())
|
||||
// Load the server config.json. This is a sensitive file so care must be taken to only send to trusted administrators.
|
||||
if (userHasSiteUpdate() && (domain.myserver !== false) && ((domain.myserver == null) || (domain.myserver.config === true))) {
|
||||
const configFilePath = common.joinPath(parent.parent.datapath, (parent.parent.args.configfile ? parent.parent.args.configfile : 'config.json'));
|
||||
fs.readFile(configFilePath, 'utf8', function (err, data) { obj.send({ action: 'serverconfig', data: data }); });
|
||||
}
|
||||
}
|
||||
|
||||
function serverCommandServerStats(command) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue