8000 Allow filtering users from using 'contains' operator by thisisleobro · Pull Request #2623 · better-auth/better-auth · GitHub
[go: up one dir, main page]

Skip to content

Allow filtering users from using 'contains' operator #2623

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 commu 8000 nity.

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thisisleobro
Copy link

Motivation to allow 'contains' was so that i could filter by role when calling authClient.admin.listUsers().
Currently 'eq' (equals) is the only valid operator for filtering by role but it only works if role is the unique role set on user.
A user with roles 'admin' and 'user' can not be filtered using 'admin' nor 'user' as filter value

Closes #2588

Copy link
vercel bot commented May 12, 2025

@thisisleobro is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
@mrge-io mrge-io bot left a comment

Choose a reason for hiding this comment

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

mrge reviewed 1 file and found no issues. Review PR in mrge.io.

Copy link
pkg-pr-new bot commented May 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/better-auth/better-auth@2623
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/cli@2623
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/expo@2623
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@2623

commit: 7e3fdc7

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.

Filter user by role in authClient.admin.listUsers()
2 participants
0