summaryrefslogtreecommitdiffstats
path: root/models/triggers.js
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-12 00:52:29 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-12 00:52:29 +0200
commit34b37116cf8c618a4ea12b13d969c24654f4248b (patch)
tree287193373538fb0c0e6e7d634a21c6e5f85b3811 /models/triggers.js
parent1f5f429fc4535d251d32335eea7e44904a924650 (diff)
downloadwekan-34b37116cf8c618a4ea12b13d969c24654f4248b.tar.gz
wekan-34b37116cf8c618a4ea12b13d969c24654f4248b.tar.bz2
wekan-34b37116cf8c618a4ea12b13d969c24654f4248b.zip
Fixed rule allows
Diffstat (limited to 'models/triggers.js')
-rw-r--r--models/triggers.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/models/triggers.js b/models/triggers.js
index 083c860e..a1437ea6 100644
--- a/models/triggers.js
+++ b/models/triggers.js
@@ -9,17 +9,14 @@ Triggers.mutations({
});
Triggers.allow({
- update: function () {
- // add custom authentication code here
- return true;
+ insert(userId, doc) {
+ return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
},
- insert: function () {
- // add custom authentication code here
- return true;
+ update(userId, doc) {
+ return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
},
- remove: function () {
- // add custom authentication code here
- return true;
+ remove(userId, doc) {
+ return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
}
});