Skip to content
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

CODENVY-2164: Add search user method by email/username for admins #2191

Merged
merged 1 commit into from May 16, 2017

Conversation

akorneta
Copy link
Contributor

@akorneta akorneta commented May 15, 2017

What does this PR do?

Provides a method for administrators that allow to search users by email/name parts. New method is case insensitive and finds users with names/emails that contains given part.
method path: api.endpoint/admin/user/find

What issues does this PR fix or reference?

#2164

Changelog

Add search user method by email/username for admins

Release Notes

Add new API to allow system admin to search users by names and emails

@ApiResponses({@ApiResponse(code = 200, message = "The response contains searching result"),
@ApiResponse(code = 400, message = "Missed required parameters, parameters are not valid"),
@ApiResponse(code = 500, message = "Internal server error occurred")})
public Response find(@ApiParam("User e-mail fragment")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually searching criteria tends to extend. It is better to pass DTO to avoid method signature refactoring in the future.

Copy link
Contributor Author

@akorneta akorneta May 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that in this case it is not critical, because user does not provide to many fields to search by, but for me it's ok to use DTO class instead of query parameters

@tolusha
Copy link
Contributor

tolusha commented May 15, 2017

Why n/a for changes log?

@akorneta
Copy link
Contributor Author

added changes log

@slemeur
Copy link
Contributor

slemeur commented May 15, 2017

Is this API documented in swagger?

@akorneta
Copy link
Contributor Author

@slemeur yes

@akorneta akorneta force-pushed the CODENVY-2164 branch 2 times, most recently from 36f92fd to 72b135c Compare May 16, 2017 09:00
@akorneta akorneta merged commit e28323c into master May 16, 2017
@akorneta akorneta deleted the CODENVY-2164 branch May 16, 2017 09:09
@akorneta akorneta added this to the 5.11.0 milestone May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants