diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json index e176d58e..b4157b95 100644 --- a/meshcentral-config-schema.json +++ b/meshcentral-config-schema.json @@ -175,7 +175,7 @@ "welcomePicture": { "type": "string", "description": "Name of the PNG or JPEG file that will be shown on the login screen. Put this file in the meshcentral-data folder and place the file name here." }, "hide": { "type": "integer", "default": 0 }, "footer": { "type": "string", "default": null, "description": "This is a HTML string displayed at the bottom of the web page when a user is logged in." }, - "loginfooter": { "type": "string", "default": null "description": "This is a HTML string displayed at the bottom of the web page when a user is not logged in." }, + "loginfooter": { "type": "string", "default": null, "description": "This is a HTML string displayed at the bottom of the web page when a user is not logged in." }, "certUrl": { "type": "string", "format": "uri", diff --git a/webserver.js b/webserver.js index 36292270..a40649eb 100644 --- a/webserver.js +++ b/webserver.js @@ -3274,7 +3274,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { function handleUploadFileBatch(req, res) { const domain = checkUserIpAddress(req, res); if (domain == null) { return; } - if (domain.userQuota == -1) { res.sendStatus(401); return; } var authUserid = null; if ((req.session != null) && (typeof req.session.userid == 'string')) { authUserid = req.session.userid; } const multiparty = require('multiparty'); @@ -3290,7 +3289,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { // Get the user const user = obj.users[authUserid]; - if ((user == null) || (user.siteadmin & 8) == 0) { res.sendStatus(401); return; } // Check if we have file rights + if (user == null) { parent.debug('web', 'Batch upload error, invalid user.'); res.sendStatus(401); return; } // Check if user exists // Get fields if ((fields == null) || (fields.nodeIds == null) || (fields.nodeIds.length != 1)) { res.sendStatus(404); return; } @@ -3300,7 +3299,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if ((fields.overwriteFiles != null) && (fields.overwriteFiles.length == 1) && (fields.overwriteFiles[0] == 'on')) { cmd.overwrite = true; } if ((fields.createFolder != null) && (fields.createFolder.length == 1) && (fields.createFolder[0] == 'on')) { cmd.createFolder = true; } - // Check if we have al least one target path + // Check if we have at least one target path if ((cmd.windowsPath == null) && (cmd.linuxPath == null)) { parent.debug('web', 'Batch upload error, invalid fields: ' + JSON.stringify(fields)); res.send('');