diff options
Diffstat (limited to 'models/actions.js')
-rw-r--r-- | models/actions.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/models/actions.js b/models/actions.js new file mode 100644 index 00000000..82ab0d19 --- /dev/null +++ b/models/actions.js @@ -0,0 +1,19 @@ +Actions = new Mongo.Collection('actions'); + +Actions.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)); + } +}); + +Actions.helpers({ + description() { + return this.desc; + } +});
\ No newline at end of file |