mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Refuse to update a non-local node module
This commit is contained in:
@@ -314,6 +314,9 @@
|
||||
"body":"Updating the node will require a restart of Node-RED to complete the update. This must be done manually.",
|
||||
"title": "Update nodes"
|
||||
},
|
||||
"cannotUpdate": {
|
||||
"body":"An update for this node is available, but it is not installed in a location that the palette manager can update.<br/><br/>Please refer to the documentation for how to update this node."
|
||||
},
|
||||
"button": {
|
||||
"review": "Open node information",
|
||||
"install": "Install",
|
||||
|
@@ -57,6 +57,11 @@ module.exports = {
|
||||
res.status(400).json({error:"module_already_loaded", message:"Module already loaded"});
|
||||
return;
|
||||
}
|
||||
if (!module.local) {
|
||||
log.audit({event: "nodes.install",module:node.module, version:node.version, error:"module_not_local"},req);
|
||||
res.status(400).json({error:"module_not_local", message:"Module not locally installed"});
|
||||
return;
|
||||
}
|
||||
isUpgrade = true;
|
||||
}
|
||||
promise = redNodes.installModule(node.module,node.version);
|
||||
|
Reference in New Issue
Block a user