|
|
@ -450,6 +450,9 @@ router.get('/*', async (req, res, next) => { |
|
|
|
if (pageArgs.path === 'home' && req.user.id === 2) { |
|
|
|
return res.redirect('/login') |
|
|
|
} |
|
|
|
if (WIKI.config.auth.autoLogin && req.user.id === 2) { |
|
|
|
return res.redirect('/login') |
|
|
|
} |
|
|
|
_.set(res.locals, 'pageMeta.title', 'Unauthorized') |
|
|
|
return res.status(403).render('unauthorized', { |
|
|
|
action: 'view' |
|
|
|