accessing_from for a has_many relationship?
My understanding is that
https://hexdocs.pm/ash/Ash.Policy.Check.Builtins.html#accessing_from/2
I have
-
When I load the
When I try to load the
When I replace this one line in my
acessing_from should allow me to authorize access to either side of a relationship. https://hexdocs.pm/ash/Ash.Policy.Check.Builtins.html#accessing_from/2
I have
User and Profile resources that relate to each other, but only one side is being correctly authorized and I'm not sure why. User has_many :profiles, Profile-
Profile belongs_to :user, User When I load the
user on one or more Profiles, it works just fine. When I try to load the
profiles on a User, it never is authorized.When I replace this one line in my
Profile policies to authorize_if always(), it works just fine, which is why I'm pretty sure it's accessing_from that's the culprit.
Ash