mirror of
https://github.com/wekan/wekan.git
synced 2026-02-07 09:01:47 +01:00
Merge branch 'edge' of https://github.com/andresmanelli/wekan into andresmanelli-edge
This commit is contained in:
commit
dce89bcfa8
12 changed files with 202 additions and 43 deletions
|
|
@ -6,6 +6,12 @@ allowIsBoardMember = function(userId, board) {
|
|||
return board && board.hasMember(userId);
|
||||
};
|
||||
|
||||
allowIsAnyBoardMember = function(userId, boards) {
|
||||
return _.some(boards, (board) => {
|
||||
return board && board.hasMember(userId);
|
||||
});
|
||||
};
|
||||
|
||||
allowIsBoardMemberCommentOnly = function(userId, board) {
|
||||
return board && board.hasMember(userId) && !board.hasCommentOnly(userId);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -525,3 +525,16 @@ Migrations.add('fix-circular-reference_', () => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
Migrations.add('mutate-boardIds-in-customfields', () => {
|
||||
CustomFields.find().forEach((cf) => {
|
||||
CustomFields.update(cf, {
|
||||
$set: {
|
||||
boardIds: [cf.boardId],
|
||||
},
|
||||
$unset: {
|
||||
boardId: '',
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Meteor.publishRelations('board', function(boardId) {
|
|||
this.cursor(Lists.find({ boardId }));
|
||||
this.cursor(Swimlanes.find({ boardId }));
|
||||
this.cursor(Integrations.find({ boardId }));
|
||||
this.cursor(CustomFields.find({ boardId }, { sort: { name: 1 } }));
|
||||
this.cursor(CustomFields.find({ boardIds: {$in: [boardId]} }, { sort: { name: 1 } }));
|
||||
|
||||
// Cards and cards comments
|
||||
// XXX Originally we were publishing the card documents as a child of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue