-
I have the below DSL
and these tuples {
"user": "customer:acme",
"relation": "parent",
"object": "document:a"
},
{
"user": "customer:acme",
"relation": "parent",
"object": "document:b"
},
{
"user": "customer:acme",
"relation": "parent",
"object": "user:john"
},
{
"user": "user:john",
"relation": "customer_admin",
"object": "customer:acme"
}
Given the situation above, what's the best way to get the list of the documents I might be missing something, but I couldn't find a nice way of doing this. What's the general thinking around this? Do I have to replicate some of the relationships in my own database? Are there any resources / best practices I can look at? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @vhpoet - thanks for asking! We list a bit of our thought process on this in the Search with Permissions document. TLDR - It depends on:
For some of those cases, we have an experimental endpoint called ListObjects, which given a type, a relation and a user, returns a list of object ids the user can access. Note that the current approach is experimental and not ready for production use, and comes with a few caveats including subpar latency at scale. Though we are working on optimizing it and having it production ready as soon as we can. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response! I read that page last week and forgot about it 🤦♂️. |
Beta Was this translation helpful? Give feedback.
Hey @vhpoet - thanks for asking!
We list a bit of our thought process on this in the Search with Permissions document.
TLDR - It depends on:
For some of those cases, we have an experimental endpoint called ListObjects, which given a type, a relation and a user, returns a list of object ids the user can access.
Note that the current approach is experimental and not ready for production use, and comes with a few caveats including subpar latency at scale. Though we are working on optimizing it and…