[PR #504] [CLOSED] wip: Role Based Access Control #3330

Closed
opened 2026-03-13 10:49:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/504
Author: @Bekacru
Created: 11/12/2024
Status: ❌ Closed

Base: main ← Head: feat/rbac


📝 Commits (9)

📊 Changes

13 files changed (+854 additions, -101 deletions)

View changed files

📝 packages/better-auth/src/adapters/kysely-adapter/kysely-adapter.ts (+3 -1)
➕ packages/better-auth/src/plugins/access-control/access.test.ts (+245 -0)
➕ packages/better-auth/src/plugins/access-control/client.ts (+9 -0)
➕ packages/better-auth/src/plugins/access-control/index.ts (+489 -0)
📝 packages/better-auth/src/plugins/organization/adapter.ts (+1 -1)
📝 packages/better-auth/src/plugins/organization/context.ts (+3 -1)
📝 packages/better-auth/src/plugins/organization/organization.ts (+18 -81)
📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+25 -7)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+1 -1)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+34 -3)
📝 packages/better-auth/src/plugins/organization/schema.ts (+10 -3)
📝 packages/better-auth/src/test-utils/test-instance.ts (+6 -3)
📝 packages/better-auth/src/types/helper.ts (+10 -0)

📄 Description

This plugin provides users with a more flexible, agnostic approach to access control by introducing scoped roles and permissions. With this, roles can be defined based on a particular scope—whether it’s the entire system, specific organizations, teams, or any other grouping.


🔄 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/504 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/12/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/rbac` --- ### 📝 Commits (9) - [`c742b87`](https://github.com/better-auth/better-auth/commit/c742b87d936ce24714de60f4b3908835ed52111d) init - [`7b0007c`](https://github.com/better-auth/better-auth/commit/7b0007c9ec2468c3d3a80164aaac68641b3137f4) test - [`60443e8`](https://github.com/better-auth/better-auth/commit/60443e813577f26e63f972bdeb833f442ba1f02d) feat: require uniquness in name within same scope - [`9a6e832`](https://github.com/better-auth/better-auth/commit/9a6e832bd9ed05b71db204c53e2c1924289772ac) get permisisons - [`29bb312`](https://github.com/better-auth/better-auth/commit/29bb3125746125f6947094ca8808eb66e5528ffa) wip - [`e04bd9e`](https://github.com/better-auth/better-auth/commit/e04bd9ea993e59c9636800fbfbcd25bd74cb6073) Merge branch 'main' into feat/rbac - [`3425d2d`](https://github.com/better-auth/better-auth/commit/3425d2d476f457480df606934819e56db2f22a4d) wip - [`94ae43d`](https://github.com/better-auth/better-auth/commit/94ae43d83917e34b246f702781c7b257f3440e5d) Merge branch 'main' into feat/rbac - [`e59c89d`](https://github.com/better-auth/better-auth/commit/e59c89d5a40664dd52b6967655888d7ab64306c3) feat: update role ### 📊 Changes **13 files changed** (+854 additions, -101 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/kysely-adapter/kysely-adapter.ts` (+3 -1) ➕ `packages/better-auth/src/plugins/access-control/access.test.ts` (+245 -0) ➕ `packages/better-auth/src/plugins/access-control/client.ts` (+9 -0) ➕ `packages/better-auth/src/plugins/access-control/index.ts` (+489 -0) 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/organization/context.ts` (+3 -1) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+18 -81) 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+25 -7) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+34 -3) 📝 `packages/better-auth/src/plugins/organization/schema.ts` (+10 -3) 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+6 -3) 📝 `packages/better-auth/src/types/helper.ts` (+10 -0) </details> ### 📄 Description This plugin provides users with a more flexible, agnostic approach to access control by introducing scoped roles and permissions. With this, roles can be defined based on a particular scope—whether it’s the entire system, specific organizations, teams, or any other grouping. --- <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 10:49:33 -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#3330