redirect not re-render upon failed auth

This commit is contained in:
reality 2013-07-29 20:44:12 +00:00
parent 70f41df08a
commit 329b45e895

View File

@ -170,15 +170,10 @@ var webInterface = function(dbot) {
allowedUsers = _.union(allowedUsers, dbot.config.power_users); allowedUsers = _.union(allowedUsers, dbot.config.power_users);
} }
console.log(module.config.webAccess);
console.log(allowedUsers);
if(_.include(allowedUsers, req.user.primaryNick)) { if(_.include(allowedUsers, req.user.primaryNick)) {
return next(); return next();
} else { } else {
res.render('index', { res.redirect('index');
'message': 'You don\'t have access to this module.'
});
} }
} else { } else {
return next(); return next();