summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-09-04 20:09:36 +0300
committerLauri Ojansivu <x@xet7.org>2018-09-04 20:09:36 +0300
commit77efcf71376d3da6c19ad1a4910567263e83c0ca (patch)
treecf771daed5671379fa616fbb6aed42baab8834d5 /models/users.js
parentbcbe1aaaf561f3188111b586ad0734b983206482 (diff)
downloadwekan-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 'models/users.js')
-rw-r--r--models/users.js10
1 files changed, 10 insertions, 0 deletions
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);