mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
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.
This commit is contained in:
parent
656e7e6172
commit
6db86489ab
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue