mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Moving the storage of referrer information to main authorization check instead of doing it in the authentication source
Signed-off-by: Ralph Krimmel <rkrimme1@gwdg.de>
This commit is contained in:
parent
3e8cf5778f
commit
e0a8872742
2 changed files with 5 additions and 5 deletions
|
@ -6,6 +6,8 @@ module.exports = {
|
|||
if (req.user) {
|
||||
responseError(res, '403', 'Forbidden', 'oh no.')
|
||||
} else {
|
||||
if (!req.session) req.session = {}
|
||||
req.session.returnTo = req.originalUrl || config.serverUrl + '/';
|
||||
req.flash('error', 'You are not allowed to access this page. Maybe try logging in?')
|
||||
res.redirect(config.serverURL + '/')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue