diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-09-17 12:49:43 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-09-17 12:49:43 +0300 |
commit | 5445955a774f6a9f29ee48109913ea3c4a9db33f (patch) | |
tree | 7b3bee4a7ce6d1053ca6ce0395c267f9ce3a45d8 /models/rules.js | |
parent | 338e18870f937359c50c9be8b2a0fd96e0b4e141 (diff) | |
download | wekan-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.js | 48 |
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)); - }, -}); |