MyCollection.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } });
MyCollection.allow({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; }, fetch: ['createdAt'] });
MyCollection.allow({ insert: function(userId, doc) { // Custom validation logic here return true; }, update: function(userId, doc, fields, modifier) { // Custom validation logic here return true; }, remove: function(userId, doc) { // Custom validation logic here return true; } });In this example, we can perform custom validation logic for all types of operations on MyCollection. If the validation logic passes, the operation will be allowed. Mongo.Collection allow is part of the Meteor framework, specifically the Mongo.Collection package.