mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
fix Fatal Error: Unauthorized issue due to accessControl
This commit is contained in:
parent
ced8b168bb
commit
9924edcd95
1 changed files with 5 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue