arunoda / meteor-smart-collections

Meteor Collections Re-Imagined
MIT License
147 stars 13 forks source link

SmartCollection.allow not compatibile with core Meteor Collections #42

Closed bojan88 closed 10 years ago

bojan88 commented 10 years ago

Hello,

On my server I have this

MyCollection.allow({
    remove: function(userId, doc) {
        console.log(userId);
        console.log(doc)
    }
})

And on client

MyCollection.remove(doc_id)

With SmartCollection server prints null for userId which is correct (no logged in users), but for doc I get undefined. With Meteor Collection it prints the object with doc_id

arunoda commented 10 years ago

Hmm, weird.

Are you using ObjectId for the _id. (which is not supported)

If not is it possible to show me how to reproduce this locally. (sample meteor app will be really great)

On Tue, Nov 26, 2013 at 3:26 AM, bojan88 notifications@github.com wrote:

Hello,

On my server I have this

MyCollection.allow({ remove: function(userId, doc) { console.log(userId); console.log(doc) } })

And on client

MyCollection.remove(doc_id)

With SmartCollection server prints null for userId which is correct (no logged in users), but for doc I get undefined. With Meteor Collection it prints the object with doc_id

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-smart-collections/issues/42 .

Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

bojan88 commented 10 years ago

Maybe the ObjectId caused the error. I can't reproduce it anymore.

Thanks for your quick answer, I appreciate it