Hi,
I just found out that when accessing the relationships of a model (for example /users/1/addresses) with a has_many relationship only the model#show? policy is checked. I would expect that also the relationship policy is checked (in my example addresses#show?). What is the reason that this doesn't happen? Is this an error or is this intended?
In my user addresses example I cannot forbid a user to get addresses of all the other users without forbidding all users to see another user. This is not what I want. How can I make this happen?
Hi,
I just found out that when accessing the relationships of a model (for example /users/1/addresses) with a has_many relationship only the
model#show?policy is checked. I would expect that also the relationship policy is checked (in my exampleaddresses#show?). What is the reason that this doesn't happen? Is this an error or is this intended?In my user addresses example I cannot forbid a user to get addresses of all the other users without forbidding all users to see another user. This is not what I want. How can I make this happen?