Pull refProviders into user model

This commit is contained in:
Shane Kilkelly 2016-04-01 11:36:19 +01:00
parent 0ce514a5a6
commit a686d187ad
2 changed files with 7 additions and 0 deletions

View file

@ -249,6 +249,7 @@ module.exports = ProjectController =
freeTrial: {allowed: allowedFreeTrial}
featureSwitches: user.featureSwitches
features: user.features
refProviders: user.refProviders
}
userSettings: {
mode : user.ace.mode

View file

@ -36,6 +36,8 @@ UserSchema = new Schema
compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup }
templates: { type:Boolean, default: Settings.defaultFeatures.templates }
references: { type:Boolean, default: Settings.defaultFeatures.references }
mendeley: { type:Boolean, default: Settings.defaultFeatures.mendeley }
zotero: { type:Boolean, default: Settings.defaultFeatures.zotero }
}
featureSwitches : {
pdfng: { type: Boolean }
@ -54,6 +56,10 @@ UserSchema = new Schema
# For example, a user signing up directly for a paid plan
# has this set to true, despite never having had a free trial
hadFreeTrial: {type: Boolean, default: false}
refProviders: {
mendeley: Boolean # coerce the refProviders values to Booleans
zotero: Boolean
}
conn = mongoose.createConnection(Settings.mongo.url, server: poolSize: 10)