blob: 778622c482c2b3c4aa019bfde6c59d69c64c2238 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
Rules = new Mongo.Collection('rules');
Rules.attachSchema(new SimpleSchema({
title: {
type: String,
optional: true,
},
triggerId: {
type: String,
optional: true,
},
actionId: {
type: String,
optional: true,
},
}));
Rules.mutations({
rename(description) {
return { $set: { description } };
},
});
Rules.allow({
update: function () {
// add custom authentication code here
return true;
},
remove: function () {
// add custom authentication code here
return true;
},
insert: function () {
// add custom authentication code here
return true;
},
});
|