mirror of
https://github.com/wekan/wekan.git
synced 2026-02-26 01:44:07 +01:00
Add a new SessionData collection and limit user fields
* Add new SessionData collection to store user session data available to server and client * Limit the Users fields sent to the client by `myCards`, `dueCards`, `brokenCards`, and `globalSearch` using new `Users.safeFields` * clean-up
This commit is contained in:
parent
ab183acac3
commit
ff626fb559
5 changed files with 113 additions and 81 deletions
|
|
@ -1914,14 +1914,6 @@ Cards.globalSearch = queryParams => {
|
|||
// eslint-disable-next-line no-console
|
||||
// console.log('count:', cards.count());
|
||||
|
||||
if (Meteor.isServer) {
|
||||
Users.update(userId, {
|
||||
$set: {
|
||||
'sessionData.totalHits': cards.count(),
|
||||
'sessionData.lastHit': cards.count() > 50 ? 50 : cards.count(),
|
||||
},
|
||||
});
|
||||
}
|
||||
return { cards, errors };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue