-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Denis Gorbachev
authored and
Denis Gorbachev
committed
Dec 10, 2014
1 parent
5189765
commit f0a5ca1
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(function () { | ||
// Remove this code after updating to Meteor 1.0.1. | ||
var c = typeof Mongo === "undefined" ? | ||
Meteor.Collection : Mongo.Collection; | ||
var proto = c.prototype; | ||
var orig = proto._validatedUpdate; | ||
proto._validatedUpdate = function (userId, selector, mutator) { | ||
check(mutator, Object); | ||
if (_.isEmpty(mutator)) { | ||
throw new Meteor.Error(403, "Access denied."); | ||
} | ||
return orig.apply(this, arguments); | ||
}; | ||
})(); |