Release 2.8.0
This commit is contained in:
@@ -33,6 +33,11 @@ module.exports = function registerMiddleware(app, deps) {
|
||||
return next();
|
||||
}
|
||||
|
||||
return requireAuth(req, res, next);
|
||||
return requireAuth(req, res, function () {
|
||||
if (req.currentUser && req.currentUser.mustChangePassword && req.path !== '/account' && req.path !== '/account/password' && req.path !== '/account/sessions/revoke' && req.path !== '/logout') {
|
||||
return res.redirect('/account?message=' + encodeURIComponent('Please change your password before continuing.'));
|
||||
}
|
||||
next();
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user