mirror of
https://github.com/wekan/wekan.git
synced 2026-01-07 01:58:49 +01:00
Move every Meteor.user() to the ReactiveCache
This commit is contained in:
parent
6e1ef3d94a
commit
5e3a9dc059
42 changed files with 211 additions and 252 deletions
|
|
@ -739,17 +739,12 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
lists() {
|
||||
//currentUser = Meteor.user();
|
||||
//if (currentUser) {
|
||||
// enabled = Meteor.user().hasSortBy();
|
||||
//}
|
||||
//return enabled ? this.newestLists() : this.draggableLists();
|
||||
return this.draggableLists();
|
||||
},
|
||||
|
||||
newestLists() {
|
||||
// sorted lists from newest to the oldest, by its creation date or its cards' last modification date
|
||||
const value = Meteor.user()._getListSortBy();
|
||||
const value = ReactiveCache.getCurrentUser()._getListSortBy();
|
||||
const sortKey = { starred: -1, [value[0]]: value[1] }; // [["starred",-1],value];
|
||||
return Lists.find(
|
||||
{
|
||||
|
|
@ -1299,9 +1294,10 @@ Boards.mutations({
|
|||
},
|
||||
|
||||
setBackgroundImageURL(backgroundImageURL) {
|
||||
if(Meteor.user().isBoardAdmin()) {
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
if(currentUser.isBoardAdmin()) {
|
||||
return { $set: { backgroundImageURL } };
|
||||
} else if (Meteor.user().isAdmin()) {
|
||||
} else if (currentUser.isAdmin()) {
|
||||
return { $set: { backgroundImageURL } };
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue