Every time I encounter this issue:
Uncaught Error: Not permitted. Untrusted code may only update documents by ID. [403]
and here is the relevant code snippet:
Template.notifications.events({
'click a.clearAll':function(event){
console.log("hey");
Notifications.update({{userId:Meteor.userId()},{$set:{read:true}},{multi:true});
}
})
I have already configured update permissions as follows:
Notifications.allow({
insert: function(){
return true;
},
update: function(){
return true;
}
});
What could be causing the restriction on updates?