mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Move every Boards.findOne(boardId) to the ReactiveCache (Part 2)
This commit is contained in:
parent
9022e9949f
commit
a182482cfb
37 changed files with 166 additions and 127 deletions
|
|
@ -1,16 +1,17 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
Actions = new Mongo.Collection('actions');
|
||||
|
||||
Actions.allow({
|
||||
insert(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
return allowIsBoardAdmin(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
update(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
return allowIsBoardAdmin(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
remove(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
return allowIsBoardAdmin(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue