Open DaVarga opened 4 years ago
First of all thank you for this great software. I have a question about the new CrudAuth decorator I am not sure if it works the way it should.
Let's say I have an entity Gallery which has a list of User called allowedUsers. I would configure the CrudAuth decorator as follows:
Gallery
User
allowedUsers
@CrudAuth({ filter: (req) => ({'allowedUsers.id': req.user.id}) })
getMany works as expected. I only get the corresponding galleries. getOne in combination with ?join=allowedUsers however only returns my user relation even if there are others. Is that the desired behavior?
getMany
getOne
?join=allowedUsers
Sorry for the late response. Could you please provide a generated SQL?
First of all thank you for this great software. I have a question about the new CrudAuth decorator I am not sure if it works the way it should.
Let's say I have an entity
Gallery
which has a list ofUser
calledallowedUsers
. I would configure the CrudAuth decorator as follows:getMany
works as expected. I only get the corresponding galleries.getOne
in combination with?join=allowedUsers
however only returns my user relation even if there are others. Is that the desired behavior?