Remove default value from user model, but add it upon creation (i.e. affecting new users).

This commit is contained in:
Paulo Reis 2016-11-01 16:36:26 +00:00
parent c88cb4574e
commit 840d52ef1a
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ module.exports =
user = new User() user = new User()
user.email = opts.email user.email = opts.email
user.holdingAccount = opts.holdingAccount user.holdingAccount = opts.holdingAccount
user.ace.syntaxValidation = true
username = opts.email.match(/^[^@]*/) username = opts.email.match(/^[^@]*/)
if opts.first_name? and opts.first_name.length != 0 if opts.first_name? and opts.first_name.length != 0

View file

@ -26,7 +26,7 @@ UserSchema = new Schema
autoComplete: {type : Boolean, default: true} autoComplete: {type : Boolean, default: true}
spellCheckLanguage : {type : String, default: "en"} spellCheckLanguage : {type : String, default: "en"}
pdfViewer : {type : String, default: "pdfjs"} pdfViewer : {type : String, default: "pdfjs"}
syntaxValidation : {type : Boolean, default: true} syntaxValidation : {type : Boolean}
} }
features : { features : {
collaborators: { type:Number, default: Settings.defaultFeatures.collaborators } collaborators: { type:Number, default: Settings.defaultFeatures.collaborators }