crud
crud copied to clipboard
CrudAuth nested filter
Is it possible to use a nested filter inside @CrudAuth ?
For example;
I have this relations: Projects - N:1 - Client - 1:1 - User
My crud looks like this:
@Crud({
model: {
type: Project,
},
routes: {
only: ['getManyBase'],
},
})
@CrudAuth({
filter: (user: User) => {
return { 'client.user.id': user.id };
},
})
Thanks
Same question here ! Does someone has the answer ?