mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
9 lines
322 B
JavaScript
9 lines
322 B
JavaScript
// Transport-neutral read policy for a board. Public boards accept anonymous
|
|
// readers; every other board requires an active member.
|
|
function canReadBoard(userId, board) {
|
|
return !!(board && typeof board.isVisibleBy === 'function' &&
|
|
board.isVisibleBy(userId ? { _id: userId } : null));
|
|
}
|
|
|
|
export { canReadBoard };
|