mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 15:34:07 +01:00
Use sync code in allow/deny for 2.x
This commit is contained in:
parent
f934aea2a5
commit
e77be37450
28 changed files with 594 additions and 410 deletions
|
|
@ -50,14 +50,14 @@ CardCommentReactions.attachSchema(
|
|||
);
|
||||
|
||||
CardCommentReactions.allow({
|
||||
async insert(userId, doc) {
|
||||
return allowIsBoardMember(userId, await ReactiveCache.getBoard(doc.boardId));
|
||||
insert(userId, doc) {
|
||||
return allowIsBoardMember(userId, Boards.findOne(doc.boardId));
|
||||
},
|
||||
async update(userId, doc) {
|
||||
return allowIsBoardMember(userId, await ReactiveCache.getBoard(doc.boardId));
|
||||
update(userId, doc) {
|
||||
return allowIsBoardMember(userId, Boards.findOne(doc.boardId));
|
||||
},
|
||||
async remove(userId, doc) {
|
||||
return allowIsBoardMember(userId, await ReactiveCache.getBoard(doc.boardId));
|
||||
remove(userId, doc) {
|
||||
return allowIsBoardMember(userId, Boards.findOne(doc.boardId));
|
||||
},
|
||||
fetch: ['boardId'],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue