diff options
author | David Renshaw <david@sandstorm.io> | 2017-04-04 10:37:29 -0400 |
---|---|---|
committer | David Renshaw <david@sandstorm.io> | 2017-04-04 10:37:29 -0400 |
commit | 6db86489abd06a1884e721638707d6656138ee4d (patch) | |
tree | 73251381fe7695e47345f77a3ac313f24eab1a50 /sandstorm.js | |
parent | 656e7e617225779a0d0725eb716f916fd0ff2793 (diff) | |
download | wekan-6db86489abd06a1884e721638707d6656138ee4d.tar.gz wekan-6db86489abd06a1884e721638707d6656138ee4d.tar.bz2 wekan-6db86489abd06a1884e721638707d6656138ee4d.zip |
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.
Diffstat (limited to 'sandstorm.js')
-rw-r--r-- | sandstorm.js | 3 |
1 files changed, 2 insertions, 1 deletions
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); |