From 216de59aba805c2eacf1d6742f05ea7e9199f3b9 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 5 Sep 2015 23:14:45 +0200 Subject: Support avatars and improve permissions integration on sandstorm We now update the internal state of the application every time a user connects to the application, which means that if the sandstorm sharing graph has changed since the last time we saw a user, his permissions will be updated accordingly. --- collections/boards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'collections/boards.js') diff --git a/collections/boards.js b/collections/boards.js index ddfa5016..fcd04153 100644 --- a/collections/boards.js +++ b/collections/boards.js @@ -156,7 +156,7 @@ Boards.before.insert((userId, doc) => { doc.slug = doc.slug || getSlug(doc.title) || 'board'; doc.createdAt = new Date(); doc.archived = false; - doc.members = [{ + doc.members = doc.members || [{ userId, isAdmin: true, isActive: true, -- cgit v1.2.3-1-g7c22