Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

[User Management] Update GET users API to facilitate user search #437

Closed
seanpreston opened this issue Apr 27, 2022 · 0 comments · Fixed by #444
Closed

[User Management] Update GET users API to facilitate user search #437

seanpreston opened this issue Apr 27, 2022 · 0 comments · Fixed by #444
Assignees
Labels
enhancement New feature or request

Comments

@seanpreston
Copy link
Contributor

Is your feature request related to a specific problem?

The frontend requires a way to search for users.

Describe the solution you'd like

  • Update GET /api/v1/users/ to receive an optional query parameter username=<term>
  • The endpoint should perform a query akin to FidesopsUser.query.filter(FidesopsUser.title.ilike('%<term>%'))

Additional context

Consider using https://sqlalchemy-utils.readthedocs.io/en/latest/orm_helpers.html#sqlalchemy_utils.functions.escape_like to prevent wildcards being passed in with the API input.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants