I want to insert a piece of data (let’s say, a post) in my database. I called Posts.insert() on the client side and I get this message in my browser console “insert failed: Access denied”.
I added Post.allow :
Posts.allow({
insert: function (userId, doc) {
return true;
}
});
But I still have the same message. So what I have to do ?