Commit 8970e703 authored by Nick's avatar Nick

fix: remove infinite login redirect from homepage

parent 4f23984a
...@@ -137,8 +137,6 @@ router.get('/*', async (req, res, next) => { ...@@ -137,8 +137,6 @@ router.get('/*', async (req, res, next) => {
if (!WIKI.auth.checkAccess(req.user, ['read:pages'], pageArgs)) { if (!WIKI.auth.checkAccess(req.user, ['read:pages'], pageArgs)) {
if (pageArgs.path === 'home') { if (pageArgs.path === 'home') {
return res.redirect('/login')
} else {
_.set(res.locals, 'pageMeta.title', 'Unauthorized') _.set(res.locals, 'pageMeta.title', 'Unauthorized')
return res.render('unauthorized', { action: 'view' }) return res.render('unauthorized', { action: 'view' })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment