mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 22:51:47 +01:00
Implement board archive and restoration
This commit is contained in:
parent
9faaf07e02
commit
48ac8b026f
32 changed files with 138 additions and 42 deletions
|
|
@ -22,6 +22,7 @@ Meteor.publish('boards', function() {
|
|||
}, {
|
||||
fields: {
|
||||
_id: 1,
|
||||
archived: 1,
|
||||
slug: 1,
|
||||
title: 1,
|
||||
color: 1,
|
||||
|
|
@ -30,6 +31,28 @@ Meteor.publish('boards', function() {
|
|||
});
|
||||
});
|
||||
|
||||
Meteor.publish('archivedBoards', function() {
|
||||
if (! Match.test(this.userId, String))
|
||||
return [];
|
||||
|
||||
return Boards.find({
|
||||
archived: true,
|
||||
members: {
|
||||
$elemMatch: {
|
||||
userId: this.userId,
|
||||
isAdmin: true
|
||||
}
|
||||
}
|
||||
}, {
|
||||
fields: {
|
||||
_id: 1,
|
||||
archived: 1,
|
||||
slug: 1,
|
||||
title: 1
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Meteor.publishComposite('board', function(boardId) {
|
||||
check(boardId, String);
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue