mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02: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,3 +1,5 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
|
||||
Integrations = new Mongo.Collection('integrations');
|
||||
|
||||
/**
|
||||
|
@ -102,7 +104,7 @@ const permissionHelper = {
|
|||
allow(userId, doc) {
|
||||
const user = Users.findOne(userId);
|
||||
const isAdmin = user && Meteor.user().isAdmin;
|
||||
return isAdmin || allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
return isAdmin || allowIsBoardAdmin(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
};
|
||||
Integrations.allow({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue