added method getUserIdsInRoleAsync#420
Open
bratelefant wants to merge 1 commit intoMeteor-Community-Packages:masterfrom
Open
added method getUserIdsInRoleAsync#420bratelefant wants to merge 1 commit intoMeteor-Community-Packages:masterfrom
bratelefant wants to merge 1 commit intoMeteor-Community-Packages:masterfrom
Conversation
Member
|
Thanks for the PR, can you please make the same against Meteor core? |
Contributor
Author
Sure, I can do that; whats the canonical way to do that? Seems like this is not a good constellation, to have this repo in parallel development to the core package... |
Member
|
Just open up the same PR against the core in the package and link to this PR. Once merged into core, we can merge this PR and do a release here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roles can also be used to add roles to
userIdswhich are actually not user ids at all; typical usecase could be adding roles and scopes to apikeys or device-ids (for example if you use device code flow for oauth2). In the docs, this functionality is intended (parameterusersis described as User ID(s) or object(s) with an _id field.)However, if you want to get a full list of ids that have a certain role or/and scope, there is no method to accomplish this. The existing
getUsersInRoleAsyncmethod relies on theMeteor.userscollection.So I added a method
getUserIdsInRoleAsyncmethod, that only returns an array of those ids that have the given role+scope, in order to provide this functionality to userIds which are not actualMeteor.users.