From a686d187ad99ae6b9995fceb9d2b8e33e18d0db6 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 1 Apr 2016 11:36:19 +0100 Subject: [PATCH] Pull refProviders into user model --- .../app/coffee/Features/Project/ProjectController.coffee | 1 + services/web/app/coffee/models/User.coffee | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/services/web/app/coffee/Features/Project/ProjectController.coffee b/services/web/app/coffee/Features/Project/ProjectController.coffee index 29fef997f3..f810067991 100644 --- a/services/web/app/coffee/Features/Project/ProjectController.coffee +++ b/services/web/app/coffee/Features/Project/ProjectController.coffee @@ -249,6 +249,7 @@ module.exports = ProjectController = freeTrial: {allowed: allowedFreeTrial} featureSwitches: user.featureSwitches features: user.features + refProviders: user.refProviders } userSettings: { mode : user.ace.mode diff --git a/services/web/app/coffee/models/User.coffee b/services/web/app/coffee/models/User.coffee index 0cd7196b64..4ceb87871f 100644 --- a/services/web/app/coffee/models/User.coffee +++ b/services/web/app/coffee/models/User.coffee @@ -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)