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);
}
console.log(module.config.webAccess);
console.log(allowedUsers);
if(_.include(allowedUsers, req.user.primaryNick)) {
return next();
} else {
res.render('index', {
'message': 'You don\'t have access to this module.'
});
res.redirect('index');
}
} else {
return next();