mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
🐛 Fixed edit permission of the common article by multiple authors (#10214)
closes #10212
This commit is contained in:
parent
7aa8251b80
commit
7c1840f025
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCurrentOwner() {
|
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) {
|
if (isContributor && isEdit) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue