- 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

@ -6,10 +6,14 @@ allowIsBoardMember = function(userId, board) {
return board && board.hasMember(userId);
};
allowIsBoardMemberNonComment = function(userId, board) {
allowIsBoardMemberCommentOnly = function(userId, board) {
return board && board.hasMember(userId) && !board.hasCommentOnly(userId);
};
allowIsBoardMemberNoComments = function(userId, board) {
return board && board.hasMember(userId) && !board.hasNoComments(userId);
};
allowIsBoardMemberByCard = function(userId, card) {
const board = card.board();
return board && board.hasMember(userId);