more comment on accessControls not being called

This commit is contained in:
Tyler Renelle 2012-07-19 14:59:45 -04:00
parent d53668065d
commit 2f008533bc
2 changed files with 3 additions and 2 deletions

View file

@ -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],

View file

@ -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)