From 77efcf71376d3da6c19ad1a4910567263e83c0ca Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 4 Sep 2018 20:09:36 +0300 Subject: - Add permission "No comments". It is like normal user, but does not show comments and activities. Thanks to xet7 ! --- models/users.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'models/users.js') diff --git a/models/users.js b/models/users.js index 1b1b79e1..01673e4f 100644 --- a/models/users.js +++ b/models/users.js @@ -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); -- cgit v1.2.3-1-g7c22