Nicolas Giard
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
4 deletions
-
server/controllers/common.js
|
|
@ -136,10 +136,8 @@ 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' }) |
|
|
|
} |
|
|
|
_.set(res.locals, 'pageMeta.title', 'Unauthorized') |
|
|
|
return res.render('unauthorized', { action: 'view' }) |
|
|
|
} |
|
|
|
|
|
|
|
const page = await WIKI.models.pages.getPage({ |
|
|
|