diff --git a/app/controllers/post.js b/app/controllers/post.js index e5090d1..9fd9f2e 100644 --- a/app/controllers/post.js +++ b/app/controllers/post.js @@ -260,7 +260,8 @@ class PostController extends SiteController { async getView (req, res, next) { const { comment: commentService, resource: resourceService } = this.dtp.services; try { - if ((res.locals.post.status !== 'published') && + if ((res.locals.post.status !== 'published') && + req.user && !res.locals.post.author._id.equals(req.user._id) && !req.user.hasAuthorDashboard) { throw new SiteError(403, 'The post is not published');