[GH-ISSUE #4048] [Organization Plugin] memberAc.statements do not contain permissions #9811

Closed
opened 2026-04-13 05:32:02 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @SiNONiMiTY on GitHub (Aug 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/4048

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

https://www.better-auth.com/docs/plugins/organization#roles

The documentation states that the default capabilities of the member role consists of

  • Create Projects
  • Invite Users

However, when checking the initialization of the default capabilities,
efcb6e73cc/packages/better-auth/src/plugins/organization/access/statement.ts (L26-L31)

Current vs. Expected behavior

I am expecting it should contain at least the create capability in the invitation section

What version of Better Auth are you using?

1.3.6

System info

N/A

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

Package, Documentation

Auth config (if applicable)

N/A

Additional context

No response

Originally created by @SiNONiMiTY on GitHub (Aug 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/4048 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce https://www.better-auth.com/docs/plugins/organization#roles The documentation states that the default capabilities of the `member` role consists of - Create Projects - Invite Users However, when checking the initialization of the default capabilities, https://github.com/better-auth/better-auth/blob/efcb6e73ccd9fdf2fdd5cf4d6881dc416ce7173e/packages/better-auth/src/plugins/organization/access/statement.ts#L26-L31 ### Current vs. Expected behavior I am expecting it should contain at least the `create` capability in the `invitation` section ### What version of Better Auth are you using? 1.3.6 ### System info ```bash N/A ``` ### Which area(s) are affected? (Select all that apply) Package, Documentation ### Auth config (if applicable) ```typescript N/A ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 05:32:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi @SiNONiMiTY! I'm Dosu and I’m helping the better-auth team.

You're correct—there's a mismatch between the documentation and the actual code. The docs say the member role can "Invite Users", but in the code, the memberAc role is initialized with no permissions for invitations (or any other resource), so it does not have the create capability for invitations by default (source). Recent updates and merged PRs do not change this behavior, and there’s no indication this is intentional or documented elsewhere.

This looks like either the documentation needs to be updated to match the code, or the code should be updated to grant the expected permissions to the member role. If you need members to invite users, you can override the default role statements in your config as a workaround.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3194070094 --> @dosubot[bot] commented on GitHub (Aug 17, 2025): <!-- Greeting --> Hi @SiNONiMiTY! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You're correct—there's a mismatch between the documentation and the actual code. The docs say the `member` role can "Invite Users", but in the code, the `memberAc` role is initialized with no permissions for invitations (or any other resource), so it does not have the `create` capability for invitations by default ([source](https://github.com/better-auth/better-auth/blob/ef481d8dcce32d377b412ad1a96ecb8e604c1787/packages/better-auth/src/plugins/organization/access/statement.ts)). Recent updates and merged PRs do not change this behavior, and there’s no indication this is intentional or documented elsewhere. This looks like either the documentation needs to be updated to match the code, or the code should be updated to grant the expected permissions to the `member` role. If you need members to invite users, you can override the default role statements in your config as a workaround. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4c919389-e1ce-4c2d-b506-3f6cd3ba234e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/4048)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9811