Hello! I'm having some trouble modeling a permissi...
# spicedb
l
Hello! I'm having some trouble modeling a permission with caveats:
Copy code
caveat order_filled(order_status string) {
  order_status == "filled"
}

definition user {}

definition order {
  relation filler: user
  relation consumer: user
  relation retriever: order#consumer with order_filled

  permission space_open = filler + retriever
  }
What I'm trying to achieve is having the
order#consumer
have the
space_open
permission when the caveat
order_status = "filled"
is passed in What relationship do I need to create other than
order:test_order#consumer@user:sebastian
such that
space:test_space#open@user:sebastian with { "order_status": "filled" }
passes?