|
|
|
@ -52,7 +52,7 @@ class PageService extends SiteService {
|
|
|
|
|
async createPlaceholder (author) {
|
|
|
|
|
const NOW = new Date();
|
|
|
|
|
|
|
|
|
|
if (!author.permissions.canAuthorPages || !author.flags.isAdmin) {
|
|
|
|
|
if (!author.flags.isAdmin) {
|
|
|
|
|
throw new SiteError(403, 'You are not permitted to author pages');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -103,9 +103,9 @@ class PageService extends SiteService {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (!user.permissions.canAuthorPages) {
|
|
|
|
|
throw new SiteError(403, 'You are not permitted to author or change pages.');
|
|
|
|
|
}
|
|
|
|
|
// if (!user.permissions.canAuthorPages) {
|
|
|
|
|
// throw new SiteError(403, 'You are not permitted to author or change pages.');
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (pageDefinition.title) {
|
|
|
|
|
updateOp.$set.title = striptags(pageDefinition.title.trim());
|
|
|
|
|