Rolebook vs OpenFGA: share a resource with a team
Rolebook fits when your teams live in Better Auth or your own tables and sharing with a team should be one command in your application.
OpenFGA's documentation shows how to give a team's members access to an object through relationship tuples.
A team is the subject of the grant
@rolebook/teams reads a person's teams for one explicit tenant. A grantRole command with a team as its subject shares the resource with the team's current members.
The Design team edits Brand Assets
The owner grants team design the editor role on project brand_assets. Alice is in Design, so her update is allowed, and that decision's matched.via names the team. Your app can show "editor through Design team".
If Alice leaves the team and that grant was her only source of access, her next check that reads the updated membership is no longer allowed.