# Rolebook vs OpenFGA: share a resource with a team (https://rolebook.dev/compare/openfga)

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. [OpenFGA user groups](https://openfga.dev/docs/modeling/user-groups)

## 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.

## In the Rolebook docs

- [Teams](https://rolebook.dev/docs/teams)
- [Sharing commands](https://rolebook.dev/docs/sharing/commands)
- [Decisions and explanations](https://rolebook.dev/docs/decisions)
- [All comparison guides](https://rolebook.dev/compare)
