mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Global search - add error messages for terms that are not found
This commit is contained in:
parent
4ab1a04814
commit
80b23e5cc1
7 changed files with 129 additions and 57 deletions
|
|
@ -1208,6 +1208,20 @@ function boardRemover(userId, doc) {
|
|||
);
|
||||
}
|
||||
|
||||
Boards.userSearch = (userId, includeArchived = false, selector = {}) => {
|
||||
if (!includeArchived) {
|
||||
selector = {
|
||||
archived: false,
|
||||
};
|
||||
}
|
||||
selector.$or = [
|
||||
{ permission: 'public' },
|
||||
{ members: { $elemMatch: { userId, isActive: true } } },
|
||||
];
|
||||
|
||||
return Boards.find(selector);
|
||||
};
|
||||
|
||||
Boards.userBoards = (userId, includeArchived = false, selector = {}) => {
|
||||
if (!includeArchived) {
|
||||
selector = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue