summaryrefslogtreecommitdiff
path: root/lib/note.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/note.js')
-rw-r--r--lib/note.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/note.js b/lib/note.js
index 671e5383..cd3816f9 100644
--- a/lib/note.js
+++ b/lib/note.js
@@ -12,7 +12,7 @@ var db = require("./db.js");
var logger = require("./logger.js");
//permission types
-permissionTypes = ["freely", "editable", "locked"];
+permissionTypes = ["freely", "editable", "locked", "private"];
// create a note model
var model = mongoose.model('note', {
@@ -126,7 +126,11 @@ function findNote(id, callback) {
});
}
-function newNote(id, permission, callback) {
+function newNote(id, owner, callback) {
+ var permission = "freely";
+ if (owner && owner != "null") {
+ permission = "editable";
+ }
var note = new model({
id: id,
permission: permission,