mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38: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
|
|
@ -24,14 +24,6 @@ BlazeComponent.extendComponent({
|
|||
onRendered() {
|
||||
const boardComponent = this.parentComponent().parentComponent();
|
||||
|
||||
function userIsMember() {
|
||||
return (
|
||||
Meteor.user() &&
|
||||
Meteor.user().isBoardMember() &&
|
||||
!Meteor.user().isCommentOnly()
|
||||
);
|
||||
}
|
||||
|
||||
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
|
||||
const $cards = this.$('.js-minicards');
|
||||
|
||||
|
|
@ -170,9 +162,9 @@ BlazeComponent.extendComponent({
|
|||
'option',
|
||||
'disabled',
|
||||
// Disable drag-dropping when user is not member
|
||||
!userIsMember(),
|
||||
!Utils.canModifyBoard(),
|
||||
// Not disable drag-dropping while in multi-selection mode
|
||||
// MultiSelection.isActive() || !userIsMember(),
|
||||
// MultiSelection.isActive() || !Utils.canModifyBoard(),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue