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
920 stars 167 forks source link

Add selector to Roles.getUsersInRole #376

Open bratelefant opened 1 year ago

bratelefant commented 1 year ago

I'm trying to get all users with a certain role (eg. "admin") that belong to a certain subset of the Meteor.users collection (eg. those users that have a certain tenancy id, say _tenancyId).

There's already the possibility to add queryOptions to the Roles.getUsersInRole cursor, for sorting or limiting results etc. Would be great if there was a way to add a querySelector that restricts the results from the Meteor.users collection.

I already tried some workarounds:

github-actions[bot] commented 1 year ago

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously. Our goal is to provide long-term lifecycles for packages and keep up with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time. Therefore, we can't guarantee your issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit a pull request, too! We will accompany you in the process with reviews and hints on how to get development set up.

Please also consider sponsoring the maintainers of the package. If you don't know who is currently maintaining this package, just leave a comment and we'll let you know

lucfranken commented 1 year ago

Isn't this something where scopes would be the suggested solution by the package?