forked from GitHub/dbot
redirect not re-render upon failed auth
This commit is contained in:
parent
70f41df08a
commit
329b45e895
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user