mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 17:48:49 +01:00
Fix missing profile checks.
Thanks to justinr1234 !
This commit is contained in:
parent
434ed895ed
commit
64ee60a008
14 changed files with 42 additions and 36 deletions
|
|
@ -191,19 +191,19 @@ BlazeComponent.extendComponent({
|
|||
isViewSwimlanes() {
|
||||
const currentUser = Meteor.user();
|
||||
if (!currentUser) return false;
|
||||
return (currentUser.profile.boardView === 'board-view-swimlanes');
|
||||
return ((currentUser.profile || {}).boardView === 'board-view-swimlanes');
|
||||
},
|
||||
|
||||
isViewLists() {
|
||||
const currentUser = Meteor.user();
|
||||
if (!currentUser) return true;
|
||||
return (currentUser.profile.boardView === 'board-view-lists');
|
||||
return ((currentUser.profile || {}).boardView === 'board-view-lists');
|
||||
},
|
||||
|
||||
isViewCalendar() {
|
||||
const currentUser = Meteor.user();
|
||||
if (!currentUser) return false;
|
||||
return (currentUser.profile.boardView === 'board-view-cal');
|
||||
return ((currentUser.profile || {}).boardView === 'board-view-cal');
|
||||
},
|
||||
|
||||
openNewListForm() {
|
||||
|
|
@ -335,6 +335,6 @@ BlazeComponent.extendComponent({
|
|||
isViewCalendar() {
|
||||
const currentUser = Meteor.user();
|
||||
if (!currentUser) return false;
|
||||
return (currentUser.profile.boardView === 'board-view-cal');
|
||||
return ((currentUser.profile || {}).boardView === 'board-view-cal');
|
||||
},
|
||||
}).register('calendarView');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue