Roles Module
Provides functions related to user authorization. Compatible with built-in Meteor accounts packages.
Roles are accessible through Meteor.roles
collection and documents consist of:
_id
: role namechildren
: list of subdocuments:_id
Children list elements are subdocuments so that they can be easier extended in the future or by plugins.
Roles can have multiple parents and can be children (subroles) of multiple roles.
Example: {_id: 'admin', children: [{_id: 'editor'}]}
The assignment of a role to a user is stored in a collection, accessible through RoleAssignmentCollection
.
It's documents consist of
_id
: Internal MongoDB idrole
: A role object which got assigned. Usually only contains the_id
propertyuser
: A user object, usually only contains the_id
propertyscope
: scope nameinheritedRoles
: A list of all the roles objects inherited by the assigned role.
This module provides the following classes: