Of course, but check API requires to specify a sub...
# spicedb
k
Of course, but check API requires to specify a subject, who is performing the action. But I have different relations for different subjects:
Copy code
definition folder {
  relation viewer: user:* | organization#member
  permission retrieve = viewer
}
When
organization_access
set to
viewer
, I create relation in SpiceDB
folder:1#viewer@organization:1#member
. When
public_access
set to
viewer
, I create relationship
folder:1#viewer@user:*
. Both relationship can exists in the same time. In order to use check API, I should do request like this
folder:1 retrieve <subject_type>:<subject_id>
, but if let's say I do this as orgniazation member, how I can get know that
public_access
set to
viewer
as well? And vice versa, if I check a permission as public user, how I can get know the
organization_access
value? P.S. Please, don't stick to the meaning of my examples, for instance why public users should know the access level for organization members. I just wanted to simplify my example, but in reallity I have a little more complex schema and other subjects are eligible to see certain data like
organization_access
value
Copy code
definition folder {
  relation viewer: user | organization#member | group#member | user:* | guest:* | anonymous:*
  permission retrieve = viewer
}