Merge pull request #925 from rhelsing/comment-permissions

Comment permissions
This commit is contained in:
Lauri Ojansivu 2017-03-28 20:55:02 +03:00 committed by GitHub
commit 578619d409
22 changed files with 177 additions and 63 deletions

View file

@ -121,6 +121,16 @@ if (Meteor.isClient) {
return board && board.hasMember(this._id);
},
isNotCommentOnly() {
const board = Boards.findOne(Session.get('currentBoard'));
return board && board.hasMember(this._id) && !board.hasCommentOnly(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);