[PR #5085] [CLOSED] feat(admin): add in filterOperator to listUsers #5763

Closed
opened 2026-03-13 12:34:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5085
Author: @jslno
Created: 10/4/2025
Status: Closed

Base: canaryHead: feat-admin/filter-array


📝 Commits (7)

📊 Changes

2 files changed (+37 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/admin/admin.test.ts (+14 -0)
📝 packages/better-auth/src/plugins/admin/routes.ts (+23 -3)

📄 Description

Tests will pass when better-call is bumped


Summary by cubic

Added support for the "in" filterOperator in admin.listUsers to filter users by multiple values (e.g., roles). Array filter values are now supported with strict validation.

  • New Features

    • Added "in" operator to listUsers.
    • filterValue supports arrays of strings or numbers.
    • Validation: "in" requires an array; other operators reject arrays.
  • Migration

    • When calling over HTTP, send filterValue as an array (e.g., filterValue=admin&filterValue=user).

Written for commit 702f5ec4c7. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5085 **Author:** [@jslno](https://github.com/jslno) **Created:** 10/4/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat-admin/filter-array` --- ### 📝 Commits (7) - [`7550750`](https://github.com/better-auth/better-auth/commit/75507501a42ced5785439468c1d72cf650c9f765) feat(admin): add `in` filterOperator - [`4cb6a54`](https://github.com/better-auth/better-auth/commit/4cb6a54a2bb966bf3541ddd9ebf940d34c5e8489) Merge branch 'canary' into feat-admin/filter-array - [`5a1a498`](https://github.com/better-auth/better-auth/commit/5a1a4987bf1d1f0b50a98ae1776203733fd7cfd9) Merge branch 'canary' into feat-admin/filter-array - [`d06c4c0`](https://github.com/better-auth/better-auth/commit/d06c4c02a9e8c7f2d3ebb04091b1dd72f1851dc2) chore: resolve conflicts - [`cc7f9f2`](https://github.com/better-auth/better-auth/commit/cc7f9f203905872c568fd8b0c209906aa5804393) chore: update test - [`283c574`](https://github.com/better-auth/better-auth/commit/283c574ff28aef171bbc6d9972ea8c55169ec474) Merge branch 'feat-admin/filter-array' of https://github.com/jslno/better-auth into feat-admin/filter-array - [`702f5ec`](https://github.com/better-auth/better-auth/commit/702f5ec4c7dd9f95a00cd17c9ddf845ef5a63a38) chore: cleanup ### 📊 Changes **2 files changed** (+37 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+14 -0) 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+23 -3) </details> ### 📄 Description Tests will pass when `better-call` is bumped <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added support for the "in" filterOperator in admin.listUsers to filter users by multiple values (e.g., roles). Array filter values are now supported with strict validation. - **New Features** - Added "in" operator to listUsers. - filterValue supports arrays of strings or numbers. - Validation: "in" requires an array; other operators reject arrays. - **Migration** - When calling over HTTP, send filterValue as an array (e.g., filterValue=admin&filterValue=user). <sup>Written for commit 702f5ec4c7dd9f95a00cd17c9ddf845ef5a63a38. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:34:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5763