diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-09-04 20:09:36 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-09-04 20:09:36 +0300 |
commit | 77efcf71376d3da6c19ad1a4910567263e83c0ca (patch) | |
tree | cf771daed5671379fa616fbb6aed42baab8834d5 /server/lib | |
parent | bcbe1aaaf561f3188111b586ad0734b983206482 (diff) | |
download | wekan-77efcf71376d3da6c19ad1a4910567263e83c0ca.tar.gz wekan-77efcf71376d3da6c19ad1a4910567263e83c0ca.tar.bz2 wekan-77efcf71376d3da6c19ad1a4910567263e83c0ca.zip |
- Add permission "No comments". It is like normal user, but does not show comments and activities.
Thanks to xet7 !
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/utils.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/utils.js b/server/lib/utils.js index c7763933..ee925847 100644 --- a/server/lib/utils.js +++ b/server/lib/utils.js @@ -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); |