From 6db86489abd06a1884e721638707d6656138ee4d Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Tue, 4 Apr 2017 10:37:29 -0400 Subject: fix updateUserPermissions() on Sandstorm The new isCommentOnly property needs to be set when Sandstorm updates user permissions, because otherwise a schema validation error occurs and users never get added as members of boards. --- sandstorm.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sandstorm.js') diff --git a/sandstorm.js b/sandstorm.js index 3e04d79f..2e79c27c 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -205,7 +205,8 @@ if (isSandstorm && Meteor.isServer) { function updateUserPermissions(userId, permissions) { const isActive = permissions.indexOf('participate') > -1; const isAdmin = permissions.indexOf('configure') > -1; - const permissionDoc = { userId, isActive, isAdmin }; + const isCommentOnly = false; + const permissionDoc = { userId, isActive, isAdmin, isCommentOnly }; const boardMembers = Boards.findOne(sandstormBoard._id).members; const memberIndex = _.pluck(boardMembers, 'userId').indexOf(userId); -- cgit v1.2.3-1-g7c22