lemon-apartment-14887
02/28/2024, 11:13 AM{
"namespace": "ManagedAccount",
"object": "account_1",
"relation": "admins",
"subject_set": {
"namespace": "User",
"object": "user1"
}
},
Admin relationship gives the following permissions:
'transactions.read': (ctx: Context): boolean =>
this.related.admins.includes(ctx.subject)
'reports.write': (ctx: Context): boolean =>
this.related.admins.includes(ctx.subject)
'reports.read': (ctx: Context): boolean =>
this.related.admins.includes(ctx.subject)
'transactions.read', 'reports.write', 'reports.read'
I want to make a query, that takes the User ID (subject) and returns the list of permissions they have for different managed accounts. I am interested in both relationships (roles such as admins) and permissions.
How do I make this query using Ory Keto. Expand API seems to be the right tool, but don't get the expected result. Assist me here please.