[PR #7385] [MERGED] Fix missing activeTeamId field when dynamic access control is enabled #24175

Closed
opened 2026-04-15 22:12:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7385
Author: @longnguyen2004
Created: 1/15/2026
Status: Merged
Merged: 1/18/2026
Merged by: @Bekacru

Base: canaryHead: missing-active-team-id


📝 Commits (4)

  • 9a3ad5b Fix missing activeTeamId field when dynamic access control is enabled
  • 94547ba type: update
  • 5c1b8db update: add type tests
  • 7ba6c38 Merge branch 'canary' into missing-active-team-id

📊 Changes

2 files changed (+96 additions, -58 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+37 -0)
📝 packages/better-auth/src/plugins/organization/schema.ts (+59 -58)

📄 Description

Summary by cubic

Fixes missing activeTeamId when dynamic access control is enabled by correctly merging the team schema into OrganizationSchema. Team fields now appear whenever teams.enabled is true.

  • Bug Fixes
    • Intersected the dynamicAccessControl branch with the teams branch: (dynamicAccessControl ? ... : {}) & (teams ? ... : {}), so activeTeamId and other team fields are no longer dropped.

Written for commit 7ba6c386b4. 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/7385 **Author:** [@longnguyen2004](https://github.com/longnguyen2004) **Created:** 1/15/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `missing-active-team-id` --- ### 📝 Commits (4) - [`9a3ad5b`](https://github.com/better-auth/better-auth/commit/9a3ad5b3bb41ec15615ccd351489697b844ee252) Fix missing `activeTeamId` field when dynamic access control is enabled - [`94547ba`](https://github.com/better-auth/better-auth/commit/94547ba3f0109837dbe71ec3303c69dad64672db) type: update - [`5c1b8db`](https://github.com/better-auth/better-auth/commit/5c1b8dbd86c818111966bc836af2df35b7af7636) update: add type tests - [`7ba6c38`](https://github.com/better-auth/better-auth/commit/7ba6c386b4fa46151907e148ed63dc2f5f07b55f) Merge branch 'canary' into missing-active-team-id ### 📊 Changes **2 files changed** (+96 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+37 -0) 📝 `packages/better-auth/src/plugins/organization/schema.ts` (+59 -58) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes missing activeTeamId when dynamic access control is enabled by correctly merging the team schema into OrganizationSchema. Team fields now appear whenever teams.enabled is true. - **Bug Fixes** - Intersected the dynamicAccessControl branch with the teams branch: (dynamicAccessControl ? ... : {}) & (teams ? ... : {}), so activeTeamId and other team fields are no longer dropped. <sup>Written for commit 7ba6c386b4fa46151907e148ed63dc2f5f07b55f. 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-04-15 22:12:56 -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#24175