Unverified Commit 0d2aa56b authored by Nicolas Giard's avatar Nicolas Giard Committed by GitHub

fix: view page as unauthorized user

parent 8970e703
......@@ -136,11 +136,9 @@ router.get('/*', async (req, res, next) => {
const pageArgs = pageHelper.parsePath(req.path)
if (!WIKI.auth.checkAccess(req.user, ['read:pages'], pageArgs)) {
if (pageArgs.path === 'home') {
_.set(res.locals, 'pageMeta.title', 'Unauthorized')
return res.render('unauthorized', { action: 'view' })
}
}
const page = await WIKI.models.pages.getPage({
path: pageArgs.path,
......
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