[PR #8394] [CLOSED] Fix: handle multi-role member.role in organization invite check #7947

Closed
opened 2026-03-13 13:54:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8394
Author: @UdaraWanasinghe
Created: 3/4/2026
Status: Closed

Base: canaryHead: fix/crud-invites-handle-multi-role


📝 Commits (1)

  • 4bac70b Fix: handle multi-role member.role in organization invite check

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+1 -1)

📄 Description

Fixes a bug where member.role may contain multiple comma-separated roles and the code treated it as a single value, causing incorrect permission checks.

References: better-auth/better-auth#8385


Summary by cubic

Fix incorrect permission checks when creating organization invitations if member.role contains multiple comma-separated roles. We now split roles and verify inclusion, preventing valid creators from being blocked.

Written for commit 4bac70bb16. 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/8394 **Author:** [@UdaraWanasinghe](https://github.com/UdaraWanasinghe) **Created:** 3/4/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/crud-invites-handle-multi-role` --- ### 📝 Commits (1) - [`4bac70b`](https://github.com/better-auth/better-auth/commit/4bac70bb16b6bcfc9c01161846e1b9fcf20f245d) Fix: handle multi-role member.role in organization invite check ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+1 -1) </details> ### 📄 Description Fixes a bug where member.role may contain multiple comma-separated roles and the code treated it as a single value, causing incorrect permission checks. References: better-auth/better-auth#8385 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fix incorrect permission checks when creating organization invitations if member.role contains multiple comma-separated roles. We now split roles and verify inclusion, preventing valid creators from being blocked. <sup>Written for commit 4bac70bb16b6bcfc9c01161846e1b9fcf20f245d. 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-03-13 13:54:07 -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#7947