preparation for backer-gear setting by restricting sets to user.backer

This commit is contained in:
Tyler Renelle
2013-05-04 14:10:38 +01:00
parent b468f052fd
commit 3a259ae1c7
2 changed files with 4 additions and 3 deletions
-2
View File
@@ -179,13 +179,11 @@ setupGrowlNotifications = (model) ->
# Append Bonus
bonus = model.get('_streakBonus')
debugger
if (money > 0) and !!bonus
bonus = 0.01 if bonus < 0.01
statsNotification "+ #{showCoins(bonus)} Streak Bonus!"
model.del('_streakBonus')
user.on 'set', 'stats.lvl', (captures, args) ->
if captures > args
if captures is 1 and args is 0
+4 -1
View File
@@ -39,8 +39,11 @@ userAccess = (store) ->
uid = captures.shift()
attrPath = captures.join('.') # new array shifted left, after shift() was run
if attrPath is 'backer'
return accept(false) # we can only manually set this stuff in the database
# public access to users.*.party.invitation (TODO, lock down a bit more)
if (attrPath == 'party.invitation')
if attrPath is 'party.invitation'
return accept(true)
# Same session (user.id = this.session.userId)