mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 07:52:15 +00:00
more comment on accessControls not being called
This commit is contained in:
parent
d53668065d
commit
2f008533bc
2 changed files with 3 additions and 2 deletions
|
|
@ -130,6 +130,7 @@ get('/:uidParam?', function(page, model, _arg) {
|
|||
}
|
||||
model.store.accessControl = true;
|
||||
model.store.readPathAccess('users.*', function(id, accept) {
|
||||
console.log("model.writeAccess called with id:" + id);
|
||||
return accept(id === userId);
|
||||
});
|
||||
model.store.writeAccess('*', 'users.*', function(id, accept) {
|
||||
|
|
@ -144,7 +145,6 @@ getHabits = function(page, model, userId) {
|
|||
return model.subscribe("users." + userId, function(err, user) {
|
||||
console.log(userId, 'userId');
|
||||
console.log(err, 'err');
|
||||
console.log(user.get(), '[debug] user');
|
||||
model.ref('_user', user);
|
||||
model.set('_items', {
|
||||
armor: content.items.armor[parseInt(user.get('items.armor')) + 1],
|
||||
|
|
|
|||
|
|
@ -79,9 +79,10 @@ get '/:uidParam?', (page, model, {uidParam}) ->
|
|||
#TODO these *Access functions aren't being called, why?
|
||||
model.store.accessControl = true
|
||||
model.store.readPathAccess 'users.*', (id, accept) ->
|
||||
console.log "model.writeAccess called with id:#{id}" # never called
|
||||
accept(id == userId)
|
||||
model.store.writeAccess '*', 'users.*', (id, accept) ->
|
||||
console.log "model.writeAccess called with id:#{id}"
|
||||
console.log "model.writeAccess called with id:#{id}" # never called
|
||||
accept(id == userId)
|
||||
|
||||
getHabits(page, model, userId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue