wekan/models/rules.js

42 lines
638 B
JavaScript
Raw Normal View History

2018-08-03 19:47:20 +02:00
Rules = new Mongo.Collection('rules');
Rules.attachSchema(new SimpleSchema({
title: {
type: String,
optional: true,
},
2018-08-03 20:43:37 +02:00
triggerId: {
type: String,
optional: true,
},
actionId: {
2018-08-03 19:47:20 +02:00
type: String,
optional: true,
},
}));
Rules.mutations({
rename(description) {
return { $set: { description } };
},
});
2018-08-03 20:43:37 +02:00
2018-08-03 19:47:20 +02:00
Rules.allow({
update: function () {
// add custom authentication code here
return true;
},
2018-08-03 20:43:37 +02:00
remove: function () {
// add custom authentication code here
return true;
},
insert: function () {
// add custom authentication code here
return true;
},
2018-08-03 19:47:20 +02:00
});