diff options
Diffstat (limited to 'models/triggers.js')
-rw-r--r-- | models/triggers.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/models/triggers.js b/models/triggers.js index 083c860e..a1437ea6 100644 --- a/models/triggers.js +++ b/models/triggers.js @@ -9,17 +9,14 @@ Triggers.mutations({ }); Triggers.allow({ - update: function () { - // add custom authentication code here - return true; + insert(userId, doc) { + return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId)); }, - insert: function () { - // add custom authentication code here - return true; + update(userId, doc) { + return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId)); }, - remove: function () { - // add custom authentication code here - return true; + remove(userId, doc) { + return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId)); } }); |