Skip to content

Instantly share code, notes, and snippets.

View ericwikman's full-sized avatar

Eric Wikman ericwikman

View GitHub Profile
Games = new Meteor.Collection('games');
Games.allow({
update: ownsDocument,
remove: ownsDocument
});
Games.deny({
update: function(userId, game, fieldNames) {
// may only edit the following two fields:
return (_.without(fieldNames, 'awayTeamName', 'homeTeamName').length > 0);
}