From bd331122b853dfde4e620f087316da743f89652f Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 27 Aug 2015 01:26:21 +0200 Subject: Show only boards in which the user participate in the home page grid Fixes #218 --- client/components/boards/boardList.js | 5 ++++- server/publications/boards.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/components/boards/boardList.js b/client/components/boards/boardList.js index cf6b727c..2311e7d0 100644 --- a/client/components/boards/boardList.js +++ b/client/components/boards/boardList.js @@ -4,7 +4,10 @@ BlazeComponent.extendComponent({ }, boards: function() { - return Boards.find({ archived: false }, { + return Boards.find({ + archived: false, + 'members.userId': Meteor.userId() + }, { sort: ['title'] }); }, diff --git a/server/publications/boards.js b/server/publications/boards.js index 3f4f8e73..baf1b780 100644 --- a/server/publications/boards.js +++ b/server/publications/boards.js @@ -26,6 +26,7 @@ Meteor.publish('boards', function() { slug: 1, title: 1, color: 1, + members: 1, permission: 1 } }); -- cgit v1.2.3-1-g7c22