derbyjs / racer

Realtime model synchronization engine for Node.js
1.19k stars 118 forks source link

accessControl still allows access to collection #50

Closed Ziink closed 11 years ago

Ziink commented 11 years ago

App uses mongoDB which has a collection 'ziink' with a few documents.

In server/index.js
  store.query.expose('ziink', 'test', function(id) {
    return {name: 'ziink'};
  });

  store.accessControl = true;
  store.queryAccess('ziink', 'test', function (id, accept) {
    accept(false);
  });

In app/index.js

ready(function(model) {
  window.model = model;
});

In browser

    model.query('ziink').fetch(function(err, users){console.log(users.get())})

This fetches all documents.

Derby should not allow any access to data that is not explicitly allowed when accessControl is true.

nateps commented 11 years ago

No longer relevant in 0.5