Skip to content

Commit

Permalink
fix Fatal Error: Unauthorized issue due to accessControl
Browse files Browse the repository at this point in the history
  • Loading branch information
lefnire committed Jan 23, 2013
1 parent ced8b16 commit 9924edc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ get '/', (page, model, next) ->
#if req.headers['x-forwarded-proto']!='https' and process.env.NODE_ENV=='production'
# return page.redirect 'https://' + req.headers.host + req.url

q = model.query('users').withId(model.session.userId)
model.subscribe q, (err, result) ->
user = result.at(0)
#FIXME subscribing to this query causes "Fatal Error: Unauuthorized" after conncetion for a time (racer/lib/accessControl/accessControl.Store.js)
#q = model.query('users').withId(model.session.userId)
q = "users.#{model.session.userId}"
model.subscribe q, (err, user) ->
#user = result.at(0)
model.ref '_user', user
userObj = user.get()

Expand Down

0 comments on commit 9924edc

Please sign in to comment.