openfga/openfga.dev

Direct Relationships: Invalid Model

rhamzeh opened this issue · 0 comments

In the section With Direct Relationships Disabled, the model is updated to:

model
  schema 1.1
type user
type document
  relations
    define viewer: editor
    define editor: 
type team
  relations
    define member: [user]

Which is invalid

It should be:

model
  schema 1.1
type user
type document
  relations
    define viewer: editor
    define editor: [user,team#member]
type team
  relations
    define member: [user]

This is because the type restrictions for editor are missing here