- Add permission "No comments". It is like normal user, but does not show comments and activities.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2018-09-04 20:09:36 +03:00
parent bcbe1aaaf5
commit 77efcf7137
12 changed files with 88 additions and 39 deletions

View file

@ -151,6 +151,16 @@ if (Meteor.isClient) {
return board && board.hasMember(this._id);
},
isNotNoComments() {
const board = Boards.findOne(Session.get('currentBoard'));
return board && board.hasMember(this._id) && !board.hasNoComments(this._id);
},
isNoComments() {
const board = Boards.findOne(Session.get('currentBoard'));
return board && board.hasNoComments(this._id);
},
isNotCommentOnly() {
const board = Boards.findOne(Session.get('currentBoard'));
return board && board.hasMember(this._id) && !board.hasCommentOnly(this._id);