summaryrefslogtreecommitdiffstats
path: root/models/actions.js
blob: 0430b0449b5d04a6a421dad5accdce055064fe16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Actions = new Mongo.Collection('actions');

Actions.allow({
  insert(userId, doc) {
    return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
  },
  update(userId, doc) {
    return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
  },
  remove(userId, doc) {
    return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
  },
});

Actions.helpers({
  description() {
    return this.desc;
  },
});