crud icon indicating copy to clipboard operation
crud copied to clipboard

CrudAuth nested filter

Open vladi-strilets opened this issue 4 years ago • 1 comments

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

vladi-strilets avatar Aug 25 '21 20:08 vladi-strilets

Same question here ! Does someone has the answer ?

BenStirrup avatar Jun 09 '22 19:06 BenStirrup