[GH-ISSUE #3010] Owner of organization cannot update their own roles #26756

Closed
opened 2026-04-17 17:25:59 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @harveylee on GitHub (Jun 13, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3010

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

See: https://stackblitz.com/edit/stackblitz-starters-wsvsumaj?file=index.js (node ./index.js to start)

  1. Use the Organization plugin
  2. Create an organization with a custom role
  3. Whilst authenticated as the owner, try to call updateMemberRole to assign the custom role to the owner

Current vs. Expected behavior

Expected: Owner is allowed to modify their own roles
Actual: Get the error below

[APIError: You are not allowed to update this member] {
  status: 'FORBIDDEN',
  body: {
    code: 'YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER',
    message: 'You are not allowed to update this member'
  },
  headers: {},
  statusCode: 403
}

What version of Better Auth are you using?

1.2.9

Provide environment information

- OS: Windows 11 Home, v10.0.26100 Build 26100, running WSL2
- WSL2: Linux 6.6.87.1-microsoft-standard-WSL2
- Debian trixie

Which area(s) are affected? (Select all that apply)

Backend, Package, Client

Auth config (if applicable)

See Stackblitz repro

Additional context

Possibly to related to the fix for #1518

Originally created by @harveylee on GitHub (Jun 13, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3010 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce See: https://stackblitz.com/edit/stackblitz-starters-wsvsumaj?file=index.js (`node ./index.js` to start) 1. Use the Organization plugin 2. Create an organization with a custom role 3. Whilst authenticated as the owner, try to call `updateMemberRole` to assign the custom role to the owner ### Current vs. Expected behavior Expected: Owner is allowed to modify their own roles Actual: Get the error below ``` [APIError: You are not allowed to update this member] { status: 'FORBIDDEN', body: { code: 'YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER', message: 'You are not allowed to update this member' }, headers: {}, statusCode: 403 } ``` ### What version of Better Auth are you using? 1.2.9 ### Provide environment information ```bash - OS: Windows 11 Home, v10.0.26100 Build 26100, running WSL2 - WSL2: Linux 6.6.87.1-microsoft-standard-WSL2 - Debian trixie ``` ### Which area(s) are affected? (Select all that apply) Backend, Package, Client ### Auth config (if applicable) ```typescript See Stackblitz repro ``` ### Additional context Possibly to related to the fix for #1518
GiteaMirror added the lockedbug labels 2026-04-17 17:25:59 -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#26756