[PR #2104] [MERGED] fix(organization): updateMemberRole failing if issuer has multiple roles #29756

Closed
opened 2026-04-17 21:02:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2104
Author: @dustin-we
Created: 4/3/2025
Status: Merged
Merged: 4/7/2025
Merged by: @Bekacru

Base: mainHead: fix/update-member-role


📝 Commits (4)

  • 027d2f6 fix(organization): updateMemberRole failing if issuer has multiple roles
  • 9161a83 refactor: centralize permission checks using hasPermission utility in admin and organization plugins
  • 315fc90 chore: cleaup
  • e974c62 chore: lint

📊 Changes

5 files changed (+89 additions, -43 deletions)

View changed files

📝 packages/better-auth/src/plugins/admin/client.ts (+10 -6)
📝 packages/better-auth/src/plugins/admin/has-permission.ts (+2 -2)
📝 packages/better-auth/src/plugins/organization/client.ts (+10 -6)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+39 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+28 -29)

📄 Description

closes #2100

This is my first ever contribution to OSS, so I would appreciate feedback.

This fixes the above mentioned issue and also some other stuff issues I noticed in the updateMemberRole endpoint.


🔄 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/2104 **Author:** [@dustin-we](https://github.com/dustin-we) **Created:** 4/3/2025 **Status:** ✅ Merged **Merged:** 4/7/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/update-member-role` --- ### 📝 Commits (4) - [`027d2f6`](https://github.com/better-auth/better-auth/commit/027d2f60bcf020c43d383e8fcaa25c8a38b5957f) fix(organization): updateMemberRole failing if issuer has multiple roles - [`9161a83`](https://github.com/better-auth/better-auth/commit/9161a831ee11a7302e2463d84dc28f407aaef9bd) refactor: centralize permission checks using hasPermission utility in admin and organization plugins - [`315fc90`](https://github.com/better-auth/better-auth/commit/315fc9012623d3e44f604ea33b20f167fc952a24) chore: cleaup - [`e974c62`](https://github.com/better-auth/better-auth/commit/e974c62905756ca03b9c6322e97c984542c0c90f) chore: lint ### 📊 Changes **5 files changed** (+89 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/client.ts` (+10 -6) 📝 `packages/better-auth/src/plugins/admin/has-permission.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/organization/client.ts` (+10 -6) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+39 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+28 -29) </details> ### 📄 Description closes #2100 This is my first ever contribution to OSS, so I would appreciate feedback. This fixes the above mentioned issue and also some other stuff issues I noticed in the updateMemberRole endpoint. --- <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-17 21:02:08 -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#29756