From f13c7fd5737163cac2c81879b52a0120af4e03d1 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 28 Mar 2018 13:47:34 +0100 Subject: [PATCH] Revert "Replace references feature flag with mendeley and referencesSearch" This reverts commit 12fdff37f9fd5d47e8446eebc576d8bb9e045aa4. --- .../Project/ProjectEditorHandler.coffee | 6 +- services/web/app/coffee/models/User.coffee | 60 +++++++++---------- 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee index cdd9b9e65d..258d99ca12 100644 --- a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee @@ -34,15 +34,11 @@ module.exports = ProjectEditorHandler = compileTimeout: 60 compileGroup:"standard" templates: false + references: false trackChanges: false trackChangesVisible: ProjectEditorHandler.trackChangesAvailable }) - if !result.features.mendeley? - result.features.mendeley = !!result.features.references - if !result.features.referencesSearch? - result.features.referencesSearch = !!result.features.references - return result buildOwnerAndMembersViews: (members) -> diff --git a/services/web/app/coffee/models/User.coffee b/services/web/app/coffee/models/User.coffee index d3916ab4b0..2a48105e9b 100644 --- a/services/web/app/coffee/models/User.coffee +++ b/services/web/app/coffee/models/User.coffee @@ -20,42 +20,40 @@ UserSchema = new Schema loginCount : {type : Number, default: 0} holdingAccount : {type : Boolean, default: false} ace : { - mode : {type : String, default: 'none'} - theme : {type : String, default: 'textmate'} - fontSize : {type : Number, default:'12'} - autoComplete: {type : Boolean, default: true} - autoPairDelimiters: {type : Boolean, default: true} - spellCheckLanguage : {type : String, default: "en"} - pdfViewer : {type : String, default: "pdfjs"} - syntaxValidation : {type : Boolean} - } + mode : {type : String, default: 'none'} + theme : {type : String, default: 'textmate'} + fontSize : {type : Number, default:'12'} + autoComplete: {type : Boolean, default: true} + autoPairDelimiters: {type : Boolean, default: true} + spellCheckLanguage : {type : String, default: "en"} + pdfViewer : {type : String, default: "pdfjs"} + syntaxValidation : {type : Boolean} + } features : { - collaborators: { type:Number, default: Settings.defaultFeatures.collaborators } - versioning: { type:Boolean, default: Settings.defaultFeatures.versioning } - dropbox: { type:Boolean, default: Settings.defaultFeatures.dropbox } - github: { type:Boolean, default: Settings.defaultFeatures.github } - compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout } - compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup } - templates: { type:Boolean, default: Settings.defaultFeatures.templates } - references: { type:Boolean, default: Settings.defaultFeatures.references } - trackChanges: { type:Boolean, default: Settings.defaultFeatures.trackChanges } - mendeley: { type:Boolean, default: Settings.defaultFeatures.mendeley } - referencesSearch: { type:Boolean, default: Settings.defaultFeatures.referencesSearch } - } + collaborators: { type:Number, default: Settings.defaultFeatures.collaborators } + versioning: { type:Boolean, default: Settings.defaultFeatures.versioning } + dropbox: { type:Boolean, default: Settings.defaultFeatures.dropbox } + github: { type:Boolean, default: Settings.defaultFeatures.github } + compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout } + compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup } + templates: { type:Boolean, default: Settings.defaultFeatures.templates } + references: { type:Boolean, default: Settings.defaultFeatures.references } + trackChanges: { type:Boolean, default: Settings.defaultFeatures.trackChanges } + } referal_id : {type:String, default:() -> uuid.v4().split("-")[0]} refered_users: [ type:ObjectId, ref:'User' ] refered_user_count: { type:Number, default: 0 } subscription: - recurlyToken : String - freeTrialExpiresAt: Date - freeTrialDowngraded: Boolean - freeTrialPlanCode: String - # This is poorly named. It does not directly correspond - # to whether the user has has a free trial, but rather - # whether they should be allowed one in the future. - # 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} + recurlyToken : String + freeTrialExpiresAt: Date + freeTrialDowngraded: Boolean + freeTrialPlanCode: String + # This is poorly named. It does not directly correspond + # to whether the user has has a free trial, but rather + # whether they should be allowed one in the future. + # 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