Hey I am trying to use actions, and defined one a...
# avo-2
d
Hey I am trying to use actions, and defined one as per the docs in my UserResource, however its not showing up in the UI. Is there any reasons why it wouldnt be showing that I need to check?
l
Hey @delightful-beach-23533. Are you using a Pundit policy for that resource? If so, you must set the ‘act_on?’ mathod on that policy to true (or add authorization logic to set who has access to use actions on that resource)
d
ahh right, i think i missed that. Yes I have a UserPolicy, but I dont wish to put avo auth logic in this file as i prefer to keep this logic separate
is there a way to just ignore pundit?
or at least force a namespace to policies, so that it will never use my application ones. My policies are very complex and believe avo policies should be separated. eg. UserPolicy - will be used only for my main app Avo::UserPolicy - will be used if exists only for Avo
/app/avo/policies seems like a logical place to put these
l
I see what you mean
there's this PR which will enable you to use a custom policy per resource
it will probably get merged in the next release so you can use the
UserPolicy
for now and refactor when we release it
d
legend)
good stuf man!
4 Views