summaryrefslogtreecommitdiffstats
path: root/models/rules.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-09-17 12:49:43 +0300
committerLauri Ojansivu <x@xet7.org>2018-09-17 12:49:43 +0300
commit5445955a774f6a9f29ee48109913ea3c4a9db33f (patch)
tree7b3bee4a7ce6d1053ca6ce0395c267f9ce3a45d8 /models/rules.js
parent338e18870f937359c50c9be8b2a0fd96e0b4e141 (diff)
downloadwekan-5445955a774f6a9f29ee48109913ea3c4a9db33f.tar.gz
wekan-5445955a774f6a9f29ee48109913ea3c4a9db33f.tar.bz2
wekan-5445955a774f6a9f29ee48109913ea3c4a9db33f.zip
- Revert IFTTT.
Thanks to xet7 !
Diffstat (limited to 'models/rules.js')
-rw-r--r--models/rules.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/models/rules.js b/models/rules.js
deleted file mode 100644
index 7d971980..00000000
--- a/models/rules.js
+++ /dev/null
@@ -1,48 +0,0 @@
-Rules = new Mongo.Collection('rules');
-
-Rules.attachSchema(new SimpleSchema({
- title: {
- type: String,
- optional: false,
- },
- triggerId: {
- type: String,
- optional: false,
- },
- actionId: {
- type: String,
- optional: false,
- },
- boardId: {
- type: String,
- optional: false,
- },
-}));
-
-Rules.mutations({
- rename(description) {
- return { $set: { description } };
- },
-});
-
-Rules.helpers({
- getAction(){
- return Actions.findOne({_id:this.actionId});
- },
- getTrigger(){
- return Triggers.findOne({_id:this.triggerId});
- },
-});
-
-
-Rules.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));
- },
-});