[PR #7544] [CLOSED] refactor: rewrite organization plugin (pt2) #7390

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7544
Author: @ping-maxwell
Created: 1/22/2026
Status: Closed

Base: canaryHead: refactor/org-rewrite-part2


📝 Commits (10+)

📊 Changes

82 files changed (+9373 additions, -22 deletions)

View changed files

📝 docs/components/sidebar-content.tsx (+64 -0)
📝 docs/content/docs/plugins/organization-old.mdx (+0 -0)
docs/content/docs/plugins/organization/access-control.mdx (+163 -0)
docs/content/docs/plugins/organization/active-organizations.mdx (+5 -0)
docs/content/docs/plugins/organization/dynamic-access-control.mdx (+8 -0)
docs/content/docs/plugins/organization/index.mdx (+102 -0)
docs/content/docs/plugins/organization/invitations.mdx (+237 -0)
docs/content/docs/plugins/organization/members.mdx (+37 -0)
docs/content/docs/plugins/organization/organization-identifiers.mdx (+100 -0)
docs/content/docs/plugins/organization/organizations.mdx (+410 -0)
docs/content/docs/plugins/organization/teams.mdx (+6 -0)
📝 packages/better-auth/src/client/plugins/index.ts (+1 -0)
📝 packages/better-auth/src/db/field.ts (+26 -14)
packages/better-auth/src/plugins/organization-new/access/has-permission.ts (+83 -0)
packages/better-auth/src/plugins/organization-new/access/index.ts (+5 -0)
packages/better-auth/src/plugins/organization-new/access/permission.ts (+53 -0)
packages/better-auth/src/plugins/organization-new/access/statement.ts (+41 -0)
packages/better-auth/src/plugins/organization-new/access/types.ts (+9 -0)
packages/better-auth/src/plugins/organization-new/access/utils.ts (+3 -0)
packages/better-auth/src/plugins/organization-new/addons/dynamic-access-control/index.ts (+10 -0)

...and 62 more files

📄 Description

Organization Rewrite (part 2)

This PR will be the organization plugin rewrite, the goal is to fix all primary issues actively seen in the current organization plugin.

PRs:


🔄 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/7544 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 1/22/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `refactor/org-rewrite-part2` --- ### 📝 Commits (10+) - [`3d34ee3`](https://github.com/better-auth/better-auth/commit/3d34ee3e93035f5dfa83e23a2ded5f921a0359ad) wip - [`84d94a4`](https://github.com/better-auth/better-auth/commit/84d94a47c47dbfb00a6dfae7bd708a6a204fc68c) Update build-endpoint-schema.ts - [`bd84663`](https://github.com/better-auth/better-auth/commit/bd846631166f675e88be8f1dd3be21ee10be529f) update: improve build-endpoint-schema - [`9662e67`](https://github.com/better-auth/better-auth/commit/9662e674b4eaf6ad123c649255d5269fc95cbe94) Merge branch 'canary' into feat/org-rewrite - [`e50272b`](https://github.com/better-auth/better-auth/commit/e50272bb8672386f01097d6e96fa3e1b57a19aa7) fix: count-org adapter function to use member table - [`c025cf7`](https://github.com/better-auth/better-auth/commit/c025cf7136bec34a7ccf4ad9bb4264a4ea47be2d) Merge branch 'feat/org-rewrite' of https://github.com/ping-maxwell/better-auth into feat/org-rewrite - [`93a0670`](https://github.com/better-auth/better-auth/commit/93a0670f6f679fb4f76a3cc8967166ab602ba16f) Merge branch 'canary' into feat/org-rewrite - [`15bba08`](https://github.com/better-auth/better-auth/commit/15bba08f059d42c488c81f5050896a347e0c6282) update: create-org first-stage completed - [`36e975f`](https://github.com/better-auth/better-auth/commit/36e975f50b997711e990860fc066902ac84fe50b) Update build-endpoint-schema.ts - [`3cba580`](https://github.com/better-auth/better-auth/commit/3cba5809aec688ceaf6d81b7f37293c1f1818665) fix: create deep copy to avoid deep mutation ### 📊 Changes **82 files changed** (+9373 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/components/sidebar-content.tsx` (+64 -0) 📝 `docs/content/docs/plugins/organization-old.mdx` (+0 -0) ➕ `docs/content/docs/plugins/organization/access-control.mdx` (+163 -0) ➕ `docs/content/docs/plugins/organization/active-organizations.mdx` (+5 -0) ➕ `docs/content/docs/plugins/organization/dynamic-access-control.mdx` (+8 -0) ➕ `docs/content/docs/plugins/organization/index.mdx` (+102 -0) ➕ `docs/content/docs/plugins/organization/invitations.mdx` (+237 -0) ➕ `docs/content/docs/plugins/organization/members.mdx` (+37 -0) ➕ `docs/content/docs/plugins/organization/organization-identifiers.mdx` (+100 -0) ➕ `docs/content/docs/plugins/organization/organizations.mdx` (+410 -0) ➕ `docs/content/docs/plugins/organization/teams.mdx` (+6 -0) 📝 `packages/better-auth/src/client/plugins/index.ts` (+1 -0) 📝 `packages/better-auth/src/db/field.ts` (+26 -14) ➕ `packages/better-auth/src/plugins/organization-new/access/has-permission.ts` (+83 -0) ➕ `packages/better-auth/src/plugins/organization-new/access/index.ts` (+5 -0) ➕ `packages/better-auth/src/plugins/organization-new/access/permission.ts` (+53 -0) ➕ `packages/better-auth/src/plugins/organization-new/access/statement.ts` (+41 -0) ➕ `packages/better-auth/src/plugins/organization-new/access/types.ts` (+9 -0) ➕ `packages/better-auth/src/plugins/organization-new/access/utils.ts` (+3 -0) ➕ `packages/better-auth/src/plugins/organization-new/addons/dynamic-access-control/index.ts` (+10 -0) _...and 62 more files_ </details> ### 📄 Description ## Organization Rewrite (part 2) This PR will be the organization plugin rewrite, the goal is to fix all primary issues actively seen in the current organization plugin. ### PRs: * [part 1](https://github.com/better-auth/better-auth/pull/7251) * [part 2](https://github.com/better-auth/better-auth/pull/7544) - You're here. * [part 3](https://github.com/better-auth/better-auth/pull/7591) * [part 4](https://github.com/better-auth/better-auth/pull/7601) * [part 5](https://github.com/better-auth/better-auth/pull/7628) * [part 6](https://github.com/better-auth/better-auth/pull/7886) --- <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:34:31 -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#7390