Fixed post preview access flag in 3.0 (#11275)

no-issue

The access flag was not being set in the preview controller which was causing 3.0 Member themes to incorrectly hide the content
This commit is contained in:
Casper Bøgeskov Hansen 2019-10-31 07:58:47 +01:00 committed by Fabien O'Carroll
parent 2dc6f30f11
commit 638b4fc2f2

View File

@ -53,6 +53,10 @@ module.exports = function previewController(req, res, next) {
return urlUtils.redirect301(res, urlService.getUrlByResourceId(post.id, {withSubdirectory: true}));
}
if (res.locals.apiVersion !== 'v0.1' && res.locals.apiVersion !== 'v2') {
post.access = !!post.html;
}
// @TODO: See helpers/secure
helpers.secure(req, post);