fix for if statement in post service

master
Andrew Woodlee 2 years ago
parent 64681cb886
commit d0834c6373

@ -148,7 +148,7 @@ class PostService extends SiteService {
const postWillBePublished = post.status !== 'published' && postDefinition.status === 'published';
if (postWillBePublished) {
if (!user.permissions.canPublishPosts || !user.flags.isAdmin) {
if (!user.permissions.canPublishPosts && !user.flags.isAdmin) {
throw new SiteError(403, 'You are not permitted to publish posts');
}
}

Loading…
Cancel
Save