[PR #3934] [CLOSED] fix(org): prevent cross-org role updates in updateMemberRole #13342

Closed
opened 2026-04-13 08:52:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3934
Author: @Kinfe123
Created: 8/11/2025
Status: Closed

Base: canaryHead: fix/update-member-role-org-scope


📝 Commits (2)

  • 67138e4 fix(org): prevent cross-org role updates in updateMemberRole
  • aa075d9 lint

📊 Changes

2 files changed (+29 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+23 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+6 -0)

📄 Description

Summary by cubic

Blocked users from updating member roles across different organizations to prevent unauthorized changes.

  • Bug Fixes
  • Added a check to ensure member role updates only apply within the same organization.
  • Updated tests to cover cross-organization role update attempts.

🔄 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/3934 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/11/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/update-member-role-org-scope` --- ### 📝 Commits (2) - [`67138e4`](https://github.com/better-auth/better-auth/commit/67138e4ffc8e76fa0ad683aebd98963fffb74644) fix(org): prevent cross-org role updates in updateMemberRole - [`aa075d9`](https://github.com/better-auth/better-auth/commit/aa075d9ba1e5b97c419ff6530d353b32d6407137) lint ### 📊 Changes **2 files changed** (+29 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+23 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+6 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Blocked users from updating member roles across different organizations to prevent unauthorized changes. - **Bug Fixes** - Added a check to ensure member role updates only apply within the same organization. - Updated tests to cover cross-organization role update attempts. <!-- 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-13 08:52:38 -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#13342