Multiple Teams Membership #909

Closed
opened 2026-03-13 08:09:35 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @OscarMayReal on GitHub (Mar 24, 2025).

Is this suited for github?

  • Yes, this is suited for github

teams allow better managment of orgs, but sometimes members need to be in more than one team

Describe the solution you'd like

an option to allow members to be in more than one team, and only be able to see the teams they are a member of

Describe alternatives you've considered

creating a seperate database that manages access permissions for each team

Additional context

No response

Originally created by @OscarMayReal on GitHub (Mar 24, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. teams allow better managment of orgs, but sometimes members need to be in more than one team ### Describe the solution you'd like an option to allow members to be in more than one team, and only be able to see the teams they are a member of ### Describe alternatives you've considered creating a seperate database that manages access permissions for each team ### Additional context _No response_
GiteaMirror added the enhancement label 2026-03-13 08:09:35 -05:00
Author
Owner

@i-am-rad commented on GitHub (Mar 26, 2025):

Yes I want this as well. Members currently have only one spot for a teamId. Maybe a flag for multi-team support and a team_member table.

@i-am-rad commented on GitHub (Mar 26, 2025): Yes I want this as well. Members currently have only one spot for a teamId. Maybe a flag for multi-team support and a team_member table.
Author
Owner

@XanderXVD commented on GitHub (Apr 14, 2025):

The teams function is great for bringing structure within an organization by grouping users logically. However, the current setup limits users to a single team through a direct teamId field on the user, which restricts flexibility.

Wouldn't this be better addressed by introducing a join table — e.g. teams_members — that maps users to teams in a many-to-many relationship? This way, users can be part of multiple teams, and permission checks can be scoped accordingly to the teams they belong to.

This approach would also make it easier to extend with role-based access per team in the future if needed.

@XanderXVD commented on GitHub (Apr 14, 2025): The teams function is great for bringing structure within an organization by grouping users logically. However, the current setup limits users to a single team through a direct `teamId` field on the user, which restricts flexibility. Wouldn't this be better addressed by introducing a join table — e.g. `teams_members` — that maps users to teams in a many-to-many relationship? This way, users can be part of multiple teams, and permission checks can be scoped accordingly to the teams they belong to. This approach would also make it easier to extend with role-based access per team in the future if needed.
Author
Owner

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

Hi, @OscarMayReal. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested support for members to belong to multiple teams within an organization with restricted visibility.
  • Community members like i-am-rad and XanderXVD support this and suggest implementing a many-to-many relationship via a join table (e.g., teams_members).
  • This approach would allow multi-team membership and scoped permission checks.
  • The idea is favored for its flexibility and potential for future role-based access control enhancements.
  • The issue remains unresolved with broad positive community interest.

Next Steps:

  • Please let me know if this feature is still relevant to your use case with the latest version of better-auth by commenting on this issue.
  • If I don’t hear back within 7 days, I will automatically close the issue to keep the backlog manageable.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 3, 2025): Hi, @OscarMayReal. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested support for members to belong to multiple teams within an organization with restricted visibility. - Community members like i-am-rad and XanderXVD support this and suggest implementing a many-to-many relationship via a join table (e.g., teams_members). - This approach would allow multi-team membership and scoped permission checks. - The idea is favored for its flexibility and potential for future role-based access control enhancements. - The issue remains unresolved with broad positive community interest. **Next Steps:** - Please let me know if this feature is still relevant to your use case with the latest version of better-auth by commenting on this issue. - If I don’t hear back within 7 days, I will automatically close the issue to keep the backlog manageable. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#909