Add node.error handling to core nodes

This commit is contained in:
Nick O'Leary
2015-03-16 13:58:01 +00:00
parent 5efc89d514
commit be61cf6a88
19 changed files with 107 additions and 110 deletions

View File

@@ -44,7 +44,7 @@ function init(_settings,storage) {
function needsPermission(permission) {
return function(req,res,next) {
if (settings.adminAuth) {
if (settings && settings.adminAuth) {
return passport.authenticate(['bearer','anon'],{ session: false })(req,res,function() {
if (!req.user) {
return next();