code-corps / code-corps-api

Elixir/Phoenix API for Code Corps.
https://www.codecorps.org
MIT License
234 stars 86 forks source link

Switch from canary to bodyguard #181

Open joshsmith opened 8 years ago

joshsmith commented 8 years ago

Another library came to my attention at ElixirConf that looks a lot more explicit in its implementation than canary and maps closer to Pundit than cancancan. It's named bodyguard.

We should do a PR to switch from one to the other. Should be relatively trivial considering the similarity of can?/3.

joshsmith commented 7 years ago

Per #332 the current canary library is causing two records to load. bodyguard will not.

begedin commented 7 years ago

Outline of what needs to be done here

Should probably be done with adding ja_resource into controllers that don't have it yet

joshsmith commented 7 years ago

I'll tackle #349 first actually today, if I can get to it in time.

begedin commented 7 years ago

0.3.0 of bodyguard supports permitted attributes. It's not as flexible as changesets, but we should look into using those when we find the time.

Still not sure how it works in conjunction with ja_resource