Ash FrameworkAF
Ash Framework7mo ago
8 replies
Chaz Watkins

How to use field policies to show/hide fields in a UI?

I am diving into field policies to make some data available for certain subscription plans. When the field returns %ForbiddenField{}, Phoenix HTML doesn't know how to deal with it.

What's the best practice for doing this in the UI? The only thing I can think of is to use is_struct(resource.field, Ash.ForbiddenField everywhere.
Was this page helpful?