I've been playing around with the new experimental...
# spicedb
b
I've been playing around with the new experimental APIs in v1.33.0, in particular
ExperimentalComputablePermissions
, and I was wondering the following: using either an existing API or a combination of existing APIs, is there a way to get the same type of information but for actual entities? My initial thought was to use
LookupResources
, but it doesn't quite cut it because I have cases with intersections where the subject won't satisfy the entire intersection but is still related to the resource. Any suggestions appreciated! Example:
Copy code
definition user {}

definition group {
    relation member: user
}

definition document {
    relation first: group#member
    relation second: group#member
    permission view = first & second
}
With the relations:
Copy code
group:a#member@user:ben
group:b#member@user:ben
document:z#first@group:a#member
document:z#second@group:b#member
Calling
ExperimentalComputablePermissions
on
group#member
does tell me that it is used to compute
document#view
, but calling a
LookupResources
on either
document view group:a
or
document view group:a#member
doesn't return anything. I want to know that
group:a#member
is used to compute
document:z#view
in a generic fashion
3 Views