consider this schema
# spicedb
c
consider this schema
Copy code
definition user {}

defintion project {
  relation viewer: user
  permission = viewer
}

definition resource {
  relation project: project
  permission view = project->view
}
Could i, in one operation/one api call, lookup all `resource`s that a given user has access to within a given project?
y
not until we have something like https://github.com/authzed/spicedb/issues/1317
but it's something we're interested in, and something that the community has shown a lot of interest in
c
Alright, we would have a lot of interest in this too 😅 what would you say an alternative to this would be at the moment? Parse the response from
zed relationship read resource project project:projectId
to get all the
resource
ids and then run bulk permission against those?
or in a more general context, get the entire set of resrouces the subject has permission on and then filter against our own db T_T
y
or postfilter
get a page of results from your DB, bulk check them, refetch and repeat as needed to fill a page of your API response
materialize is another option, but that's a paid feature
c
Alright thanks! 🙏 Would you be able to tell me if this feature is planned and if so what the timeline for it is looking like?
y
it's not currently on our roadmap, but we've got some work scheduled in the same neighborhood that should make implementing this easier 🤔
i wouldn't depend on it being present by a certain date though
c
gotcha, thanks!
2 Views