mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
🐛 Fixed edit permission of the common article by multiple authors (#10214)
closes #10212
This commit is contained in:
parent
7aa8251b80
commit
7c1840f025
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user