Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
921 stars 166 forks source link

Fixes bug in getGroupsForUser related to periods #267

Closed luixal closed 4 years ago

luixal commented 5 years ago

When using roles that include periods (.), as an example in the docs, getGroupsForUser will always return an empty array is one of those roles is passed.

Group names are converted by replacing periods (.) with underscores (_) which is needed as groups names are used as roles object keys. Role names are never converted this way so the commented line seems to make non sense here.

This fixes #236

mitar commented 4 years ago

Closing in favor of 6b2ca9d. Thanks for making it.