Use old China server behavior for users who have paid in the past but aren't currently subscribed

This commit is contained in:
Nick Winter 2016-09-16 10:49:05 -07:00
parent ea7b94bba1
commit 6b75fb0a76
2 changed files with 4 additions and 4 deletions

View file

@ -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) ->

View file

@ -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 = ->