Skip to content

Instantly share code, notes, and snippets.

@colllin
Last active August 29, 2015 14:12
Show Gist options
  • Save colllin/adf4626cc3e38391e5f7 to your computer and use it in GitHub Desktop.
Save colllin/adf4626cc3e38391e5f7 to your computer and use it in GitHub Desktop.
Meteor Shell -- collection.deny does not validate server writes
> Polygons.deny({update: function() { return true; }});
> p=Polygons.findOne();
{ _id: '74iGubCqxB29ZF2tJ',
geom:
{ type: 'Polygon',
coordinates: [ [Object] ],
type2: 'Polygonal' },
tags: {} }
> Polygons.update({_id: p._id}, {$set: {'geom.type2': 'Polygonify'}})
1
> Polygons.findOne(p._id)
{ _id: '74iGubCqxB29ZF2tJ',
geom:
{ type: 'Polygon',
coordinates: [ [Object] ],
type2: 'Polygonify' },
tags: {} }
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment