Is it possible to prevent any direct use of Ash resource?
Hi sorry i could not this in document, I want to create a policy (not ash policy) to notice developers!! they just must call domain and any query with resource in out of resource for example in LiveView is forbidden!
is there any option? it is like create boundary
Thank you in advance
3 Replies
Solution
No, there is no real way to prevent directly calling the resource.
Well..I mean you could do this:
and then write a policy that checks the context for example
but nothing stops a developer from just setting that context
Not an Ash specific answer: depending on the situation, you might be able to use the general purpose Boundary hex package: https://hexdocs.pm/boundary/Boundary.html