Update all nodes to credentials system and auth middleware

This commit is contained in:
Nick O'Leary
2015-02-06 21:10:14 +00:00
parent f4fdebfba5
commit 08791f1914
29 changed files with 177 additions and 783 deletions

View File

@@ -231,7 +231,7 @@ module.exports = function(RED) {
}
RED.nodes.registerType("rpi-pibrella out",PibrellaOut);
RED.httpAdmin.get('/rpi-pibpins/:id',function(req,res) {
res.send( JSON.stringify(pinsInUse) );
RED.httpAdmin.get('/rpi-pibpins/:id',RED.auth.needsPermission('rpi-pibrella.read'),function(req,res) {
res.json(pinsInUse);
});
}

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-pibrella",
"version" : "0.0.5",
"version" : "0.0.6",
"description" : "A Node-RED node to read from and write to a Pibrella Raspberry Pi add-on board",
"dependencies" : {
},

View File

@@ -248,11 +248,9 @@ module.exports = function(RED) {
RED.nodes.registerType("blinkstick",BlinkStick);
RED.httpAdmin.get("/blinksticklist",function(req,res) {
RED.httpAdmin.get("/blinksticklist", RED.auth.needsPermission("blinkstick.read"), function(req,res) {
blinkstick.findAllSerials(function(serials) {
res.writeHead(200, {'Content-Type': 'application/json'});
res.write(JSON.stringify(serials));
res.end();
res.json(serials);
});
});
};

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-blinkstick",
"version" : "0.1.1",
"version" : "0.1.2",
"description" : "A Node-RED node to control a Blinkstick",
"dependencies" : {
"blinkstick" : "1.1.*"