summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-09-06 11:56:38 +0300
committerLauri Ojansivu <x@xet7.org>2018-09-06 11:56:38 +0300
commit9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527 (patch)
tree3f786e7a6feebbf28eceff70ca531bb0be02b80b /models/boards.js
parentf346ce04f58c1e44ec2d58df409b7558fd33b91e (diff)
downloadwekan-9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527.tar.gz
wekan-9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527.tar.bz2
wekan-9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527.zip
- REST API: Create board options to be modifiable, like
permissions, public/private board - now private by default, and board background color. Docs at https://github.com/wekan/wekan/wiki/REST-API-Boards Thanks to xet7 ! Related #1037
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/models/boards.js b/models/boards.js
index 71049bd9..1acaeae8 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -846,14 +846,14 @@ if (Meteor.isServer) {
members: [
{
userId: req.body.owner,
- isAdmin: true,
- isActive: true,
- isNoComments: false,
- isCommentOnly: false,
+ isAdmin: req.body.isAdmin || true,
+ isActive: req.body.isActive || true,
+ isNoComments: req.body.isNoComments || false,
+ isCommentOnly: req.body.isCommentOnly || false,
},
],
- permission: 'public',
- color: 'belize',
+ permission: req.body.permission || 'private',
+ color: req.body.color || 'belize',
});
JsonRoutes.sendResult(res, {
code: 200,