mirror of
https://github.com/wekan/wekan.git
synced 2025-12-27 20:58:48 +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,3 +1,4 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { DataCache } from 'meteor-reactive-cache'
|
||||
|
||||
Checklists = new Mongo.Collection('checklists');
|
||||
|
|
@ -350,9 +351,7 @@ if (Meteor.isServer) {
|
|||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
// Check user has permission to add checklist to the card
|
||||
const board = Boards.findOne({
|
||||
_id: paramBoardId,
|
||||
});
|
||||
const board = ReactiveCache.getBoard(paramBoardId);
|
||||
const addPermission = allowIsBoardMemberCommentOnly(req.userId, board);
|
||||
Authentication.checkAdminOrCondition(req.userId, addPermission);
|
||||
const paramCardId = req.params.cardId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue