Skip to content

Commit

Permalink
allow multiple author with array in author key (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
francou committed Jul 19, 2022
1 parent 98bab6b commit 794277f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server-nodejs/routes/perms-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module.exports = function(app) {
perms.push(true);
continue;
}
if(nodes[i].author !== username) {
if (Array.isArray(nodes[i].author) ? nodes[i].author.indexOf(username) === -1
: nodes[i].author !== username) {
perms.push(false);
continue;
}
Expand Down

0 comments on commit 794277f

Please sign in to comment.