summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-03-28 20:55:02 +0300
committerGitHub <noreply@github.com>2017-03-28 20:55:02 +0300
commit578619d409b4952da34ac5f286c4d80a14b2015d (patch)
tree8c5aec1191ff21975569432a3496dc581f2247b4 /models/users.js
parent0c36f5f4c27dce6207b1d8093f387d6a55a6da02 (diff)
parente7fddc2bcb71fca3e806ac75280d5c81dfc1529e (diff)
downloadwekan-578619d409b4952da34ac5f286c4d80a14b2015d.tar.gz
wekan-578619d409b4952da34ac5f286c4d80a14b2015d.tar.bz2
wekan-578619d409b4952da34ac5f286c4d80a14b2015d.zip
Merge pull request #925 from rhelsing/comment-permissions
Comment permissions
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 f944d7b1..edf1a203 100644
--- a/models/users.js
+++ b/models/users.js
@@ -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);