Hello, I have a question. Is there a way to retrie...
# spicedb
d
Hello, I have a question. Is there a way to retrieve all permission that are contained in a relationship? For example: given a schema like:
Copy code
definition resource {
    relation manager: user
    relation owner: user
    
    permission own = owner
    permission manage = manager + own
}
What I'd like to have is, given
resource_type=resource, relation=owner
return a list of permission an owner has on the resource type
resource
, in this case it would be
[own, manage]
. while if I query
manager
would be
[manage]
. This could be useful so that I don't have to hardcode the permission hierarchy in my code, but query it directly from spice