[PR #5862] [MERGED] feat: add support for organization slug on list members #6283

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5862
Author: @Bekacru
Created: 11/9/2025
Status: Merged
Merged: 11/22/2025
Merged by: @Bekacru

Base: canaryHead: feat/support-slug


📝 Commits (8)

📊 Changes

2 files changed (+72 additions, -8 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/routes/crud-members.test.ts (+13 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+59 -8)

📄 Description

Summary by cubic

Add support for querying organization members and resolving roles by organization slug. Clients can now pass a slug instead of an ID, with clear errors when the slug doesn't exist and membership checks on role lookups.

  • New Features
    • Accept organizationSlug in listMembers and getActiveMemberRole.
    • Resolve slug to organization ID; return ORGANIZATION_NOT_FOUND if missing.
    • Preserve existing behavior: organizationId or active organization fallback.
    • Added test for listing members by organization slug.

Written for commit d667f84475. 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/5862 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/9/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `feat/support-slug` --- ### 📝 Commits (8) - [`2b27b66`](https://github.com/better-auth/better-auth/commit/2b27b66a143d676db71baf421ea1c6797b0383c7) feat: support slug for find member - [`f1f3fb9`](https://github.com/better-auth/better-auth/commit/f1f3fb9e25496df2ea4e9f9302d981cbd068089e) fix test - [`6afbc00`](https://github.com/better-auth/better-auth/commit/6afbc004d9bba54f9a875f3361d3361b57cef010) fix - [`516a5c4`](https://github.com/better-auth/better-auth/commit/516a5c47f72a4339de763e3b06925946faa31aea) add check - [`124d2d8`](https://github.com/better-auth/better-auth/commit/124d2d8d1243e2002854db283ecace6dc7866a57) fix - [`d8aca1c`](https://github.com/better-auth/better-auth/commit/d8aca1ccfc63b23f40954206fe52f8f71f75d2df) update test - [`48bc3bb`](https://github.com/better-auth/better-auth/commit/48bc3bbbe5734e35dc03249ddacec62cf66dcd3a) use slug - [`d667f84`](https://github.com/better-auth/better-auth/commit/d667f844758754ba2fcb268fbf60f0f7b16c95ea) crud-member ### 📊 Changes **2 files changed** (+72 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.test.ts` (+13 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+59 -8) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add support for querying organization members and resolving roles by organization slug. Clients can now pass a slug instead of an ID, with clear errors when the slug doesn't exist and membership checks on role lookups. - **New Features** - Accept organizationSlug in listMembers and getActiveMemberRole. - Resolve slug to organization ID; return ORGANIZATION_NOT_FOUND if missing. - Preserve existing behavior: organizationId or active organization fallback. - Added test for listing members by organization slug. <sup>Written for commit d667f844758754ba2fcb268fbf60f0f7b16c95ea. 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:53:25 -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#6283