-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add partial search by usernames to GET /organizations/:guid/users #2920
Conversation
For partial_usernames parameter we are using UAA /Users endpoint that require `scim.read` scope. This change is reflected in CF-D [PR](cloudfoundry/cf-deployment#984) Co-authored-by: Juan Diego Gonzalez <[email protected]> Co-authored-by: Alexander Berezovsky <[email protected]>
if precise_username_match | ||
results = query(:user_id, includeInactive: true, filter: filter_string) | ||
else | ||
results = query(:user, filter: filter_string, attributes: 'id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for partial usernames, only active ones will be returned, right?
expect(message.partial_usernames).to eq(%w[bob]) | ||
end | ||
end | ||
|
||
context 'guids, usernames, origins are nil' do | ||
let(:params) do | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The context 'guids, usernames, origins must be arrays'
should not be underneath context 'guids, usernames, origins are nil'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move the test
a8c4168
to
ec28a76
Compare
ec28a76
to
92242e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to @MerricdeLauney and me. We'll merge once you finalize the open discussions with Philip.
92242e8
to
51fbbc4
Compare
@jdgonzaleza I think you deleted most of the |
Co-authored-by: Juan Diego Gonzalez <[email protected]> Co-authored-by: Alexander Berezovsky <[email protected]>
51fbbc4
to
4580e86
Compare
Are there any other pending implementation issues blocking us from merging this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new filter parameter works when retrieving paginated user results in apps-manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…oudfoundry#2920) * Add partial search by usernames to GET /organizations/:guid/users For partial_usernames parameter we are using UAA /Users endpoint that require `scim.read` scope. This change is reflected in CF-D [PR](cloudfoundry/cf-deployment#984) Co-authored-by: Alexander Berezovsky <[email protected]> Co-authored-by: Juan Diego Gonzalez <[email protected]>
…oudfoundry#2920) * Add partial search by usernames to GET /organizations/:guid/users For partial_usernames parameter we are using UAA /Users endpoint that require `scim.read` scope. This change is reflected in CF-D [PR](cloudfoundry/cf-deployment#984) Co-authored-by: Alexander Berezovsky <[email protected]> Co-authored-by: Juan Diego Gonzalez <[email protected]>
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
Add partial search by usernames to GET /organizations/:guid/users
For partial_usernames parameter, we are using UAA /Users endpoint that requires
scim.read
scope.An explanation of the use cases your change solves
This will let us to find usernames by substring e.g.
GET /organizations/:guid/users?partial_usernames=foo
Links to any other associated PRs
CF-D PR
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests using
bundle exec rake
I have run CF Acceptance Tests
Coauthored by @jdgonzaleza