Norberto Cáceres
06/27/2023, 6:17 PMMatthew Ebeweber
06/27/2023, 6:19 PMrelationMapper
argument here that might solve what you needAlex Olivier (Cerbos)
relationMapper
- there are some examples in the tests which are a starting point https://github.com/cerbos/query-plan-adapters/blob/main/prisma/src/index.test.ts#L455Alex Olivier (Cerbos)
Norberto Cáceres
06/27/2023, 6:39 PM{"authz.creatorId":{"equals":"userId"}}
when I would expect something like {"authz": {"creatorId": {"equals": "userId"}}}
Norberto Cáceres
06/27/2023, 6:53 PMcreatorId
within authz
it still assumes that the property is called authz.creatorId
Norberto Cáceres
06/27/2023, 7:14 PMfieldNameMapper
. But that results in the following filters {"request.resource.attr.authz.creatorId":{"equals":"userId"}}}
Norberto Cáceres
06/27/2023, 7:16 PMAlex Olivier (Cerbos)
Norberto Cáceres
06/28/2023, 5:17 PMAlex Olivier (Cerbos)
Alex Olivier (Cerbos)
Norberto Cáceres
06/28/2023, 5:38 PMNorberto Cáceres
06/28/2023, 5:38 PMAlex Olivier (Cerbos)
await prisma.ApiKey.findMany({
where: {
authz: {
creatorId: "..."
}
},
});
Norberto Cáceres
06/28/2023, 6:15 PMAlex Olivier (Cerbos)
Alex Olivier (Cerbos)
@cerbos/orm-prisma@1.1.0-alpha.1
- could you try it out for your use case when you have a chance?Norberto Cáceres
06/28/2023, 8:39 PMNorberto Cáceres
06/28/2023, 9:26 PMNorberto Cáceres
06/28/2023, 9:27 PMAlex Olivier (Cerbos)
Norberto Cáceres
06/28/2023, 9:27 PMAlex Olivier (Cerbos)
Alex Olivier (Cerbos)
1.1.0