🐛 Fixed edit permission of the common article by multiple authors (#10214)

closes #10212
This commit is contained in:
Kacper Duras 2018-12-03 17:44:23 +01:00 committed by Naz Gargol
parent 7aa8251b80
commit 7c1840f025

View File

@ -315,7 +315,7 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
}
function isCurrentOwner() {
return context.user === postModel.related('authors').models[0].id;
return postModel.related('authors').models.map(author => author.id).includes(context.user);
}
if (isContributor && isEdit) {