I think I'm facing similar issue. I want to lookup...
# spicedb
k
I think I'm facing similar issue. I want to lookup all resources that user can view. But at the same time I need to return all permission associated with give resource for the user.
Copy code
definition user {}

definition resource {
    relation user: user

    permission edit = user
    permission view = user
    permission delete = user
}
Usecase: When you build any resource list on the frontend, you want to display them, but also return permissions to the FE about each resource - if it's editable or deletable - so the FE can render proper UI. What's the best approach here? Make 3 calls (N in general - 1 per permission) and check intersection of returned sets?