User Groups
To add users to groups and grant groups access to an object using OpenFGA.
When to use
Relationship tuples can specify that an entire group has a relation to an object, which is helpful when you want to encompass a set of users with the same relation to an object. For example:
- Grant
vieweraccess to a group ofengineersinroadmap.doc - Create a
block_listofmemberswho can't access adocument - Sharing a
documentwith ateam - Granting
vieweraccess to aphototofollowersonly - Making a
fileviewable for alluserswithin anorganization - Restricting access from or to
usersin a certainlocale
Before you start
Familiarize yourself with the OpenFGA Concepts.
Assume you have the following authorization model.
: you have an object called document that users can relate to as an editor.
: you have an object called
document that users can relate to as an editor.model
schema 1.1
type user
type document
relations
define editor: [user]
In addition, you will need to know the following:
Direct Access
You need to know how to create an authorization model and a relationship tuple to grant a user access to an object. To learn more, see direct access.