[PR #7859] [MERGED] fix: support all where operators in list filter endpoints #7595

Closed
opened 2026-03-13 13:42:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7859
Author: @bytaesu
Created: 2/8/2026
Status: Merged
Merged: 2/10/2026
Merged by: @himself65

Base: canaryHead: 2026-02-08/fix/list-filter-operators


📝 Commits (2)

  • 59e3f20 fix: support all where operators in list filter endpoints
  • 69dd012 fix: add array of numbers support to list filter value types

📊 Changes

7 files changed (+77 additions, -23 deletions)

View changed files

📝 docs/content/docs/plugins/admin.mdx (+3 -3)
📝 docs/content/docs/plugins/organization.mdx (+2 -2)
📝 packages/better-auth/src/plugins/admin/routes.ts (+4 -1)
📝 packages/better-auth/src/plugins/organization/adapter.ts (+2 -1)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.test.ts (+45 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+4 -1)
📝 packages/core/src/db/adapter/index.ts (+17 -15)

📄 Description


Summary by cubic

Support all where operators in list filters for admin listUsers and organization listMembers. Adds in/not_in/contains/starts_with/ends_with and supports string[] and number[] filter values for in/not_in.

  • Bug Fixes
    • Centralized operators in core (whereOperators, WhereOperator); updated Where type and value to include number[].
    • Updated Zod schemas to use whereOperators and accept string[] | number[] for filterValue.
    • Adjusted organization adapter to use WhereOperator.
    • Added tests for in, not_in, and starts_with in listMembers.
    • Updated admin and organization docs to reflect new operators and array filter values.

Written for commit 69dd012543. Summary will update 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/7859 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/8/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-02-08/fix/list-filter-operators` --- ### 📝 Commits (2) - [`59e3f20`](https://github.com/better-auth/better-auth/commit/59e3f207607cd99ff92192546c4fdbd29121a500) fix: support all where operators in list filter endpoints - [`69dd012`](https://github.com/better-auth/better-auth/commit/69dd0125435007fd339500e6ef8fd313dd57d95e) fix: add array of numbers support to list filter value types ### 📊 Changes **7 files changed** (+77 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/admin.mdx` (+3 -3) 📝 `docs/content/docs/plugins/organization.mdx` (+2 -2) 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+4 -1) 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.test.ts` (+45 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+4 -1) 📝 `packages/core/src/db/adapter/index.ts` (+17 -15) </details> ### 📄 Description - Closes https://github.com/better-auth/better-auth/issues/7803 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Support all where operators in list filters for admin listUsers and organization listMembers. Adds in/not_in/contains/starts_with/ends_with and supports string[] and number[] filter values for in/not_in. - **Bug Fixes** - Centralized operators in core (whereOperators, WhereOperator); updated Where type and value to include number[]. - Updated Zod schemas to use whereOperators and accept string[] | number[] for filterValue. - Adjusted organization adapter to use WhereOperator. - Added tests for in, not_in, and starts_with in listMembers. - Updated admin and organization docs to reflect new operators and array filter values. <sup>Written for commit 69dd0125435007fd339500e6ef8fd313dd57d95e. Summary will update 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 13:42:36 -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#7595