Singha1
05/29/2023, 11:46 AMvroldanbet
05/29/2023, 3:43 PMuser:*
).
caveat my_policy(authorize bool) {
authorize
}
definition user {}
definition resource{
relationship policy: user:* with my_policy
permission authorize = policy
}
This is a very naive example, but hopefully illustrates the idea. With the above schema, and by storing just the schema and a single relationship user:*
, you can let the caveat context arguments decide the outcome of the authorization request.Singha1
05/29/2023, 5:00 PMvroldanbet
05/29/2023, 5:10 PMvroldanbet
05/29/2023, 5:12 PMSingha1
05/30/2023, 7:24 AM