From 6b75fb0a761d25ea6e6fa3ead45447ff3026c654 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 16 Sep 2016 10:49:05 -0700 Subject: [PATCH] Use old China server behavior for users who have paid in the past but aren't currently subscribed --- app/models/User.coffee | 4 ++-- server/models/User.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/User.coffee b/app/models/User.coffee index 167f4dd11..46905818c 100644 --- a/app/models/User.coffee +++ b/app/models/User.coffee @@ -228,11 +228,11 @@ module.exports = class User extends CocoModel isOnPremiumServer: -> return true if me.get('country') in ['brazil'] - return true if me.get('country') in ['china'] and me.isPremium() + return true if me.get('country') in ['china'] and (me.isPremium() or me.get('stripe')) return false isOnFreeOnlyServer: -> - return true if me.get('country') in ['china'] and not me.isPremium() + return true if me.get('country') in ['china'] and not (me.isPremium() or me.get('stripe')) return false sendVerificationCode: (code) -> diff --git a/server/models/User.coffee b/server/models/User.coffee index c604ecf68..650e9e6b3 100644 --- a/server/models/User.coffee +++ b/server/models/User.coffee @@ -329,11 +329,11 @@ UserSchema.methods.isPremium = -> UserSchema.methods.isOnPremiumServer = -> return true if @get('country') in ['brazil'] - return true if @get('country') in ['china'] and @isPremium() + return true if @get('country') in ['china'] and (@isPremium() or @get('stripe')) return false UserSchema.methods.isOnFreeOnlyServer = -> - return true if @get('country') in ['china'] and not @isPremium() + return true if @get('country') in ['china'] and not (@isPremium() or @get('stripe')) return false UserSchema.methods.level = ->