Got another one. How have you all been approaching...
# talk-keto
p
Got another one. How have you all been approaching list endpoints where Keto needs to filter down the results to a subset. Take the following policy for example:
Copy code
class Account implements Namespace {
  related: {
    accountAdmins: User[]
  }

  permits = {
    read: (ctx: Context) => 
      this.related.accountAdmins.includes(ctx.subject)
  }
}
If I wanted to list the accounts a user has access to what would be nice would be something like: GET relation-tuples?namespace=Account&relation=read&subjectid=x But that won't work because the relation here is accountAdmins. I could list by accountAdmins, but that would be pushing the authz logic into clients. I could also do a check for every account, but that is slow. Is there a better way to do this?