From 49819b41db42be41cf246fafe7b1612a11bd2fac Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 23 Nov 2019 14:32:49 -0500 Subject: [PATCH] fix: missing write:pages perm for edit existing pages (#1228) --- package.json | 2 +- server/controllers/common.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9133354f..cec346bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wiki", - "version": "2.0.0-beta", + "version": "2.0.0", "releaseDate": "2019-01-01T01:01:01.000Z", "description": "A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown", "main": "wiki.js", diff --git a/server/controllers/common.js b/server/controllers/common.js index 9601a377..4951d23e 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -66,7 +66,7 @@ router.get(['/e', '/e/*'], async (req, res, next) => { } if (page) { - if (!WIKI.auth.checkAccess(req.user, ['manage:pages'], pageArgs)) { + if (!WIKI.auth.checkAccess(req.user, ['write:pages', 'manage:pages'], pageArgs)) { _.set(res.locals, 'pageMeta.title', 'Unauthorized') return res.render('unauthorized', { action: 'edit' }) }