mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Clarify error message when replacing a document in a restricted collection
A user wrote in to meteor-talk being confused about this.
This commit is contained in:
@@ -533,7 +533,7 @@ Meteor.Collection.prototype._validatedUpdate = function(
|
||||
_.each(mutator, function (params, op) {
|
||||
if (op[0] !== '$') {
|
||||
throw new Meteor.Error(
|
||||
403, "Access denied. Can't replace document in restricted collection.");
|
||||
403, "Access denied. In a resticted collection you can only update documents, not replace them. Use a Mongo update operator, such as '$set'.");
|
||||
} else {
|
||||
_.each(_.keys(params), function (field) {
|
||||
// treat dotted fields as if they are replacing their
|
||||
|
||||
Reference in New Issue
Block a user