summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/models/users.js b/models/users.js
index 2c9ae380..cf4c4193 100644
--- a/models/users.js
+++ b/models/users.js
@@ -12,16 +12,12 @@ if (Meteor.isClient) {
Users.helpers({
isBoardMember() {
const board = Boards.findOne(Session.get('currentBoard'));
- return board &&
- _.contains(_.pluck(board.members, 'userId'), this._id) &&
- _.where(board.members, {userId: this._id})[0].isActive;
+ return board && board.hasMember(this._id);
},
isBoardAdmin() {
const board = Boards.findOne(Session.get('currentBoard'));
- return board &&
- this.isBoardMember(board) &&
- _.where(board.members, {userId: this._id})[0].isAdmin;
+ return board && board.hasAdmin(this._id);
},
});
}