Fixed notes that could not be written.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-14 14:15:59 -07:00
parent f72663200f
commit 63813a48ff
2 changed files with 2 additions and 2 deletions

View File

@ -2453,7 +2453,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
db.Get(command.id, function (err, nodes) { // TODO: Make a NodeRights(user) method that also does not do a db call if agent is connected (???)
if ((nodes == null) || (nodes.length == 1)) {
meshlinks = user.links[nodes[0].meshid];
if ((meshlinks) && (meshlinks.rights) && (meshlinks.rights & parent.MESHRIGHT_SETNOTES != 0)) {
if ((meshlinks) && (meshlinks.rights) && ((meshlinks.rights & MESHRIGHT_SETNOTES) != 0)) {
// Set the id's notes
if (common.validateString(command.notes, 1) == false) {
db.Remove('nt' + command.id); // Delete the note for this node

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.2-j",
"version": "0.4.2-k",
"keywords": [
"Remote Management",
"Intel AMT",