First Commit
This commit is contained in:
commit
601e886c14
2123 files changed
+334815
No files matched your search
@@ -0,0 +1,15 @@
|
||||
module.exports = {
|
||||
ensureAuthenticated: function(req, res, next) {
|
||||
if (req.isAuthenticated()) {
|
||||
return next();
|
||||
}
|
||||
req.flash('error_msg', 'Please log in to view that resource');
|
||||
res.redirect('/users/login');
|
||||
},
|
||||
forwardAuthenticated: function(req, res, next) {
|
||||
if (!req.isAuthenticated()) {
|
||||
return next();
|
||||
}
|
||||
res.redirect('/dashboard');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user