From 5445955a774f6a9f29ee48109913ea3c4a9db33f Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 17 Sep 2018 12:49:43 +0300 Subject: - Revert IFTTT. Thanks to xet7 ! --- models/rules.js | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 models/rules.js (limited to 'models/rules.js') 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)); - }, -}); -- cgit v1.2.3-1-g7c22