First post here. Been a developer for a long time and have kept my eyes at meteor since 0.4 but it wasn’t until I found angularJS-Meteor last week that I finally got to start using meteor. I’m migrating a personal project that I’m working on from Angular/PHP (Laravel 5) to Angular - Meteor and I’m blown away by the flexibility and possibilities that come with real time sync of data in meteor. Wonderful.
Now to my question, my project involves items that are shared between users who are member of a certain group. I’ve put a ID on the user.profile to know which group a user belong to. Now I want to create sharable items that are owned by a group not a user.
My question is how do I save these items in my db?
There is a function, collection.allow that seems to be the recommended way to control data being saved into a collection, but it seems to be hardcoded to only verify against the userId. My items can be edited by any member of the group so their ownership can not be verified against userId
What is the correct way to save items and be able to set up similar conditions as allow that can check other values than userId?