comment out balance

This commit is contained in:
Tyler Renelle 2013-01-27 10:05:15 -05:00
parent fea1e0efdc
commit 3f07fe9c8a

View file

@ -4,11 +4,11 @@ Setup read / write access
###
module.exports = (store) ->
store.writeAccess "*", "users.*.balance", (id, newBalance, next) ->
return unless @session and @session.userId # https://github.com/codeparty/racer/issues/37
purchasingSomethingOnClient = newBalance < this.session.req._racerModel.get("users.#{id}.balance")
isServer = not @req.socket
next(purchasingSomethingOnClient or isServer)
# store.writeAccess "*", "users.*.balance", (id, newBalance, next) ->
# return unless @session and @session.userId # https://github.com/codeparty/racer/issues/37
# purchasingSomethingOnClient = newBalance < this.session.req._racerModel.get("users.#{id}.balance")
# isServer = not @req.socket
# next(purchasingSomethingOnClient or isServer)
store.writeAccess "*", "users.*.flags.ads", -> # captures, value, next ->
return unless @session and @session.userId # https://github.com/codeparty/racer/issues/37