mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 23:44:06 +01:00
Due Cards and Broken Cards: In All Users view, fixed to show cards only from other users Public Boards. Not anymore from private boards.
Thanks to xet7 ! Related #1667
This commit is contained in:
parent
82236484bc
commit
801d0aacf0
4 changed files with 24 additions and 22 deletions
|
|
@ -93,14 +93,14 @@ Meteor.publish('dueCards', function(allUsers = false) {
|
|||
let selector = {
|
||||
archived: false,
|
||||
};
|
||||
// if user is not an admin allow her to see cards only from boards where
|
||||
// for admins and users, allow her to see cards only from boards where
|
||||
// she is a member
|
||||
if (!user.isAdmin) {
|
||||
selector.$or = [
|
||||
{ permission: 'public' },
|
||||
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
|
||||
];
|
||||
}
|
||||
//if (!user.isAdmin) {
|
||||
selector.$or = [
|
||||
{ permission: 'public' },
|
||||
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
|
||||
];
|
||||
//}
|
||||
Boards.find(selector).forEach(board => {
|
||||
permiitedBoards.push(board._id);
|
||||
});
|
||||
|
|
@ -180,14 +180,14 @@ Meteor.publish('brokenCards', function() {
|
|||
|
||||
const permiitedBoards = [null];
|
||||
let selector = {};
|
||||
// if user is not an admin allow her to see cards only from boards where
|
||||
// for admins and users, if user is not an admin allow her to see cards only from boards where
|
||||
// she is a member
|
||||
if (!user.isAdmin) {
|
||||
selector.$or = [
|
||||
{ permission: 'public' },
|
||||
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
|
||||
];
|
||||
}
|
||||
//if (!user.isAdmin) {
|
||||
selector.$or = [
|
||||
{ permission: 'public' },
|
||||
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
|
||||
];
|
||||
//}
|
||||
Boards.find(selector).forEach(board => {
|
||||
permiitedBoards.push(board._id);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue