diff --git a/nodes/core/core/20-inject.js b/nodes/core/core/20-inject.js index b97f11900..f840f0d2f 100644 --- a/nodes/core/core/20-inject.js +++ b/nodes/core/core/20-inject.js @@ -79,20 +79,20 @@ module.exports = function(RED) { delete this.cronjob; } } - - RED.httpAdmin.post("/inject/:id", function(req,res) { - var node = RED.nodes.getNode(req.params.id); - if (node != null) { - try { - node.receive(); - res.send(200); - } catch(err) { - res.send(500); - node.error("Inject failed:"+err); - console.log(err.stack); - } - } else { - res.send(404); + + RED.httpAdmin.post("/inject/:id", RED.auth.needsPermission("inject.write"), function(req,res) { + var node = RED.nodes.getNode(req.params.id); + if (node != null) { + try { + node.receive(); + res.send(200); + } catch(err) { + res.send(500); + node.error("Inject failed:"+err); + console.log(err.stack); } + } else { + res.send(404); + } }); } diff --git a/nodes/core/core/58-debug.js b/nodes/core/core/58-debug.js index b8106e2b0..d89f2dbc0 100644 --- a/nodes/core/core/58-debug.js +++ b/nodes/core/core/58-debug.js @@ -119,7 +119,7 @@ module.exports = function(RED) { }); RED.log.addHandler(DebugNode.logHandler); - RED.httpAdmin.post("/debug/:id/:state", function(req,res) { + RED.httpAdmin.post("/debug/:id/:state", RED.auth.needsPermission("debug.write"), function(req,res) { var node = RED.nodes.getNode(req.params.id); var state = req.params.state; if (node !== null && typeof node !== "undefined" ) { diff --git a/public/index.html b/public/index.html index c4b4a2c41..2dfc882c9 100644 --- a/public/index.html +++ b/public/index.html @@ -36,7 +36,7 @@ Deploy -
  • +