Skip to content

Combining Entitlements Question #314

Answered by aaguiarz
farlej2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @farlej2

Let me know if this makes sense. You can run it with the CLI with the fga model test --tests store.fga.yaml command.

model: |
  model
    schema 1.1

  type feature

  type product
    relations
      # products have a set of features
      define feature : [feature]

  type role
    relations
      # roles have users and features assigned to them
      define feature: [feature]

  type customer
    relations
      # customers have products 
      define product : [product]
      # we define this intermediate relation so it can be accessed from the user type
      define feature : feature from product

  type user
    relations
      define role: [role]
      # this is the cus…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@farlej2
Comment options

Answer selected by farlej2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants