mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40: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,3 +1,4 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import Fiber from 'fibers';
|
||||
|
||||
Meteor.startup(() => {
|
||||
|
|
@ -55,7 +56,7 @@ Meteor.startup(() => {
|
|||
Authentication.checkBoardAccess = function(userId, boardId) {
|
||||
Authentication.checkLoggedIn(userId);
|
||||
|
||||
const board = Boards.findOne({ _id: boardId });
|
||||
const board = ReactiveCache.getBoard(boardId);
|
||||
const normalAccess =
|
||||
board.permission === 'public' ||
|
||||
board.members.some(e => e.userId === userId && e.isActive);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue