Reputation: 75
So, I'm a little stumped. I've set up the Allow deny rules. But they don't work. And I've tried every variation I can think of. Right now, I have the bellow code block.
Players.allow({
insert: function(userId, doc){
return true;
},
remove: function(userId, doc){
console.log("REMOVAL!");
return false;
},
update: function(userId, doc, fieldNames, modifier){
console.log("FALSEHOODS");
return true;
},
});
That should disallow delete from that collection, correct? Or am I missing something. Right now, the update rule works great, but the removal rule doesn't even give me a message in the log.
Note: This is running on my server code right now. But I've tried it both server and client side.
Upvotes: 0
Views: 81
Reputation: 20246
Allow rules are affirmative: true means allow.
Allow/deny rules should be under /server, not on client.
Upvotes: 1