summaryrefslogtreecommitdiffstats
path: root/models/actions.js
blob: 82ab0d1959da50b2d5b544a7c35a5975033d2fec (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;
	}
});