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

add user filter startsWith and contains #7739

Merged

Conversation

dragonchaser
Copy link
Member

@dragonchaser dragonchaser commented Nov 16, 2023

Enhancement: Add user filter startswith and contains

We add two new filters to the user list endpoint. The startswith filter allows to
filter users by the beginning of their name. The contains filter allows to
filter users by a substring of their name.

refs #5486

@dragonchaser dragonchaser force-pushed the ocis-5486-filter-displayName branch 2 times, most recently from 40707a8 to 576dec1 Compare November 17, 2023 07:05
@dragonchaser dragonchaser marked this pull request as ready for review November 17, 2023 07:05
@owncloud owncloud deleted a comment from update-docs bot Nov 17, 2023
@dragonchaser dragonchaser marked this pull request as draft November 17, 2023 07:32
Copy link
Contributor

@rhafer rhafer left a comment

Choose a reason for hiding this comment

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

I am fine with merging this as is. Though in the long run would be good to have some better filtering support in the backend (as noted, for the contains function that should already work with GetUsers(), feel free to try that out).

Doing all the filtering inside the server will get us into problems at some point.

services/graph/pkg/service/v0/users_filter.go Show resolved Hide resolved
@dragonchaser dragonchaser marked this pull request as ready for review November 17, 2023 12:14
@dragonchaser dragonchaser force-pushed the ocis-5486-filter-displayName branch 2 times, most recently from fb6403d to 06a66e8 Compare November 22, 2023 08:28
Copy link

sonarcloud bot commented Nov 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
33.3% 33.3% Duplication

@dragonchaser dragonchaser merged commit e48e9cb into owncloud:master Nov 22, 2023
2 checks passed
ownclouders pushed a commit that referenced this pull request Nov 22, 2023
@dragonchaser dragonchaser deleted the ocis-5486-filter-displayName branch November 22, 2023 10:36
@dragonchaser dragonchaser mentioned this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants