mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Admins are now automatically premium.
This commit is contained in:
parent
4e11870be0
commit
3be2b6406d
2 changed files with 2 additions and 0 deletions
|
@ -171,6 +171,7 @@ module.exports = class User extends CocoModel
|
|||
|
||||
isPremium: ->
|
||||
return true if me.isInGodMode()
|
||||
return true if me.isAdmin()
|
||||
return false unless stripe = @get('stripe')
|
||||
return true if stripe.subscriptionID
|
||||
return true if stripe.free is true
|
||||
|
|
|
@ -206,6 +206,7 @@ UserSchema.methods.register = (done) ->
|
|||
|
||||
UserSchema.methods.isPremium = ->
|
||||
return true if @isInGodMode()
|
||||
return true if @isAdmin()
|
||||
return false unless stripeObject = @get('stripe')
|
||||
return true if stripeObject.subscriptionID
|
||||
return true if stripeObject.free is true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue