- Rewrite with the new schema for
roles
field andMeteor.roles
collection. - Support for roles hierarchies.
- Groups were renamed to scopes.
- Groups/scopes are always available, if you do not specify a scope, role is seen as a global role.
GLOBAL_GROUP
is deprecated and should not be used anymore (just do not specify a scope, or usenull
).getGroupsForUser
is deprecated,getScopesForUser
should be used instead.- Functions which modify roles are available both on the client and server side, but should be called on the client side only from inside Meteor methods.
deleteRole
can now delete role even when in use, it is automatically unset from all users.- Functions
addRolesToParent
andremoveRolesFromParent
were added. addUsersToRoles
andsetUserRoles
now require that roles exist and will not create missing roles automatically.- All functions work with 1.0 arguments, but in 2.0 accept extra arguments and/or options.
- Wrap localStorage in try/catch to avoid crash when disabled. #182
- Compatibility with Meteor 1.2. #133
- Pass options through to getUsersInRole. #77
- Fix formatting and punctuation in readme. #118
- Use named publish func so clients can check when ready(). #88
- Only support Meteor v1.2+ going forward; Older package versions will remain available.
-
Specific release just for bug in Meteor 0.9.1 [1]. #53
Note: Supporting both 0.9.0 and 0.9.1 with the same code base is not possible [2] so this version only supports Meteor <0.9.0 and 0.9.1+; not 0.9.0 or 0.9.0.1. Users of 0.9.0 will still use v1.2.12 which has no functional differences.
- Support Meteor 0.9.0 - new packaging system (hopefully). #52
- Add
getGroupsForUser
function. #39
- Fix behavior for groups with more than one period in their name. #44
- Let
meteor test-packages ./roles
work outside of an actual meteor app. #43
- Bump version number since Atmosphere only supports 3 levels
- Remove debug logging related to Blaze support
- Add support for Blaze UI (Meteor 0.8.0+)! The 'roles' package must come after 'ui' or 'standard-app-packages' in '.meteor/packages' for the 'isInRole' helper to be registered.
- Add descriptive error msg when group name starts with $
- Auto-convert periods in group names to underscores
- Add setUserRoles function
- Support passing user object for Roles.addUsersToRoles
- Support passing user object for Roles.removeUsersFromRoles
- Update getRolesForUser to not return null when group is specified but user has no permissions
- Support using group in 'isInRole' client handlebars helper. Contributed by @pascoual
- Support passing user object in addition to _id for Roles.getRolesForUser
- Improve internal string value of Roles.GLOBAL_GROUP constant
- Use constant property Roles.GLOBAL_GROUP instead of hard-coded string to assign blanket roles/permissions for a user
- Check Roles.GLOBAL_GROUP even if no group specified. This does not affect normal usage but provides a convenient short-hand for group users: Roles.addUsersToRoles(user, 'admin', Roles.GLOBAL_GROUP) Roles.userIsInRole(user, 'admin') => true
- Expand test coverage
- Add support for global group which provides blanket roles/permissions across all groups for that user
- Update Roles.getUsersInRole to accept an array of roles
- Add support for per-group roles
- Fix for Issue #12 - Roles.userIsInRole returns whole user record This is a breaking change for code that relied on the undocumented (and incorrect) behavior!
- Add compatibility with Meteor 0.6.5 package system
- Bug fix for Issue #11 - deleteRole by _id, not name for untrusted code. Contributed by @nickmoylan
- Fix for Issue #5 - error adding role for single user. Contributed by @mcrider
- Get tests working under Meteor 0.6.0
- Remove need for client subscribe by using 'null' publish
- Fix for Issue #3 - conflict with spiderable package
- Murky, ancient history