Forbid all but one field using field policies
Hello, I need to forbid Anonymous actor access to all fields but id and
status
. Basically it's needed for some calulcations but we don't want him to have access to any other data. So I've tried using policies like this:
But this seems to not be working, probably because for status
filed Ash checks policies from both status
and :*
. Is there any way to achieve that?3 Replies
Hey @Myrmyr , if you don't mind, please open a thread in our new forum at ElixirForum 🙂 https://elixirforum.com/c/elixir-framework-forums/ash-framework-forum/123
Elixir Programming Language Forum
Ash Forum
Sure, sorry, haven't been here in a while
Elixir Programming Language Forum
Forbid all but one field using field policies
Hello, I need to forbid Anonymous actor access to all fields but id and status . Basically it’s needed for some calulcations but we don’t want him to have access to any other data. So I’ve tried using policies like this: field_policies do field_policy :status do authorize_if always() end field_policy :* do forbid_if C...