Hello I am trying to develop a scheme in
# spicedb
a
Hello. I am trying to develop a scheme in which it will be possible to grant access to the document to a group of users. Something like "Team 1 can edit document 45, and Team 2 can only view document 45". https://play.authzed.com/s/Io0mQDdiUHSe/schema Is this even possible without granting access to individual users?
e
a
wow. i missed field subject relation... thank you. Sorry for taking time
@ecordell is it possible to get list of USERS (not teams) who has access to document resource (via api/grpc)
Using api i only get teams..

https://cdn.discordapp.com/attachments/1124334626438127817/1124349804382789673/image.png

e
you'll want to use "lookupsubjects" to parse out the users like that. ReadRelationships just returns the actual underlying data you stored (in this case, teams)

https://cdn.discordapp.com/attachments/1124334626438127817/1124350494396121118/Screenshot_2023-06-30_at_10.46.43_AM.png

^ this is a screenshot from running that command in the "zed terminal" on the playground
but it just calls the LookupSubjects API