About policies
It seems that policies are not triggered. I found this and tried but without success.
https://discord.com/channels/711271361523351632/1079519120971812914
From examples we can see, that policies are invoked only if i explicitly pass
authorize?: true
or actor: current_user
even tho in api i have defined authorize :by_default
5 Replies
Are you familiar with the way filter policies work?
For reads you wonβt generally get forbidden errors, you will filter the result set to limit visibility.
Yes thats is exactly what i expect. after providing authorization authorize :by_default i expect that policies will be executed and only related data will be show or empty list, if actor not present. currently if actor is not present all organizations are listed
i did dependency update/mix compile --force, and now it seems to work correctly
oh interesting
so
:by_default
wasn't being honored for you?
(:by_default
will be the default in 3.0)it seems so.
i dont know man, sometimes, elixir compiled parts get stuck and do not recompile correctly. Like once every month. Rarely enough that i dont think of it streight away, but often enough, that im like, ah, once again π
sorry for this thread, its unrelated. its my machines fault π
Not a problem, glad you've got it figured out π