mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
cant see add list if comment only
This commit is contained in:
parent
e6276271b1
commit
383daf6f64
3 changed files with 12 additions and 1 deletions
|
@ -25,7 +25,7 @@ template(name="boardBody")
|
|||
+list(this)
|
||||
if currentCardIsInThisList
|
||||
+cardDetails(currentCard)
|
||||
if currentUser.isBoardMember
|
||||
if canSeeAddList
|
||||
+addListForm
|
||||
|
||||
template(name="addListForm")
|
||||
|
|
|
@ -204,3 +204,9 @@ BlazeComponent.extendComponent({
|
|||
}];
|
||||
},
|
||||
}).register('addListForm');
|
||||
|
||||
Template.boardBody.helpers({
|
||||
canSeeAddList() {
|
||||
return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
|
||||
},
|
||||
});
|
||||
|
|
|
@ -117,6 +117,11 @@ if (Meteor.isClient) {
|
|||
return board && board.hasMember(this._id);
|
||||
},
|
||||
|
||||
isCommentOnly() {
|
||||
const board = Boards.findOne(Session.get('currentBoard'));
|
||||
return board && board.hasCommentOnly(this._id);
|
||||
},
|
||||
|
||||
isBoardAdmin() {
|
||||
const board = Boards.findOne(Session.get('currentBoard'));
|
||||
return board && board.hasAdmin(this._id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue