Ash.Resource.Calculation with field_policy
in a calculation Ash.Resource.Calculation
I have the following load:
but user has a field_policy defined to prevent to have :email and :phone_number for specific actors.
Does the load take into account the actor from context?
Else how to do to make sure that field_policy applies with the given actor ?
In my case, I am loading :email and :full_phone_number, not because I need them in the calculation itself.. but later to display them in my page if they are defined.
Regards,
Angy
3 Replies
Please note that I have defined my field_policy like
I have tried
for the load... but it did not worked...
That is by design
Policies are not applied to calculation dependencies
It's a complex thing and some day we may provide the option to apply them
But for now you'd need to load the data inside the calculation using
Ash.load!thanks for the information