[GH-ISSUE #1518] Admins can update Owners in organization #26123

Closed
opened 2026-04-17 16:34:04 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @nainglinnkhant on GitHub (Feb 20, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1518

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Login as the member with the admin role and try to update members with owner role or remove them.

Current vs. Expected behavior

Current Behaviour

In an organization, members with admin role are able to remove the members with owner role and update the role of members with owner role. (updateMemberRole and removeMember endpoints)

Expected Behaviour

Access control should be more detailed. For example:

  • Owners can update the role of any member. (Already working)
  • Admins can update role of/remove other members and admins. But not owners. (Not working)
  • Members cannot update nor remove other members. (Already working)

What version of Better Auth are you using?

latest

Provide environment information

- MacOS
- Chrome

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

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @nainglinnkhant on GitHub (Feb 20, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1518 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Login as the member with the `admin` role and try to update members with `owner` role or remove them. ### Current vs. Expected behavior ### Current Behaviour In an organization, members with `admin` role are able to remove the members with `owner` role and update the role of members with `owner` role. (updateMemberRole and removeMember endpoints) ### Expected Behaviour Access control should be more detailed. For example: - Owners can update the role of any member. (Already working) - Admins can update role of/remove other members and admins. But not owners. (Not working) - Members cannot update nor remove other members. (Already working) ### What version of Better Auth are you using? latest ### Provide environment information ```bash - MacOS - Chrome ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-17 16:34:04 -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#26123