summaryrefslogtreecommitdiff
path: root/lib/models
diff options
context:
space:
mode:
authorMax Wu2017-02-10 10:55:05 +0800
committerGitHub2017-02-10 10:55:05 +0800
commitcd24e758052191bacc3f51ddb8cca9a25244bd14 (patch)
tree4af49606224a7c6952c2148bbd0a3064fb9b2607 /lib/models
parenta19163d68a5c69c18637b3f617cc912dab500524 (diff)
parent00d1543a1017a231761ac20aaa49627e5744d923 (diff)
Merge pull request #348 from nvsofts/add_default_permission
Add default permission config
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/note.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/note.js b/lib/models/note.js
index 86112973..8b38d3f9 100644
--- a/lib/models/note.js
+++ b/lib/models/note.js
@@ -513,10 +513,10 @@ module.exports = function (sequelize, DataTypes) {
}
}
}
- // if no permission specified and have owner then give editable permission, else default permission is freely
+ // if no permission specified and have owner then give default permission in config, else default permission is freely
if (!note.permission) {
if (note.ownerId) {
- note.permission = "editable";
+ note.permission = config.defaultpermission;
} else {
note.permission = "freely";
}