[PR #5856] feat(organization): Add limit & offset to Teams and Roles #14526

Closed
opened 2026-04-13 09:31:14 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5856

State: closed
Merged: No


This PR adds pagination support to the organization plugin's team and role listing endpoints. Organization members had a way of doing this already, so this is mostly an extension of that.

Changes Made

  • Added limit and offset query parameters to listTeams endpoint
  • Added limit and offset query parameters to listOrgRoles endpoint
  • Added limit and offset query parameters to listTeamMembers endpoint
  • Added tests for `crud-team.ts
  • Added docs for new query params

If I have missed anything just leave it in the comments and ill get on it :)


Summary by cubic

Adds pagination to organization team, role, and team member listing endpoints using limit and offset to reduce payload size and improve performance. Adapter and routes now pass pagination options; tests and docs included.

  • New Features
    • listTeams, listOrgRoles, and listTeamMembers accept optional limit and offset query params.
    • Adapter methods forward pagination to findMany with no change in behavior when omitted.
    • Added tests for pagination across roles, teams, and team members, and updated docs.

Written for commit c2d3b301fe. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5856 **State:** closed **Merged:** No --- This PR adds pagination support to the organization plugin's team and role listing endpoints. Organization members had a way of doing this already, so this is mostly an extension of that. Changes Made - Added `limit` and `offset` query parameters to `listTeams` endpoint - Added `limit` and `offset` query parameters to `listOrgRoles` endpoint - Added `limit` and `offset` query parameters to `listTeamMembers` endpoint - Added tests for `crud-team.ts - Added docs for new query params If I have missed anything just leave it in the comments and ill get on it :) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds pagination to organization team, role, and team member listing endpoints using limit and offset to reduce payload size and improve performance. Adapter and routes now pass pagination options; tests and docs included. - **New Features** - listTeams, listOrgRoles, and listTeamMembers accept optional limit and offset query params. - Adapter methods forward pagination to findMany with no change in behavior when omitted. - Added tests for pagination across roles, teams, and team members, and updated docs. <sup>Written for commit c2d3b301fe0634d3aed662cc62bd3f42e48ae320. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:31:14 -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#14526