Here’s the idea. I am using alanning:roles
and aldeed:simple-schema
in order to create a user based system. The problem is that often this has the potential to get very large, but I divide it up in queries in common and uniform ways. For example, take the following routes:
"/game/:gameId/players" => Roles.getUsersInRole('player', this.params.gameId);
"/game/:gameId/admins" => Roles.getUsersInRole('admin', this.params.gameId);
What I am wondering is if there is a more “scalable” solution; for example, to have a “pseudo-collection” that doesn’t necessarily exist on its own, but is a more manageable proxy to my users collection. Eg, Players
is a subset of Meteor.users
such that it is the result of Roles.getUsersInRole('player')