I keep getting this error:
Uncaught Error: Not permitted. Untrusted code may only update documents by ID. [403]
and here is the code:
Template.notifications.events({
'click a.clearAll':function(event){
console.log("hey");
Notifications.update({{userId:Meteor.userId()},{$set:{read:true}},{multi:true});
}
})
I've also set update permissions:
Notifications.allow({
insert: function(){
return true;
},
update: function(){
return true;
}
});
Why is it not letting me update?