cpjk / canary

:hatching_chick: Elixir authorization and resource-loading library for Plug applications.
MIT License
473 stars 52 forks source link

Add a 'scope' parameter to provide runtime query configuration #48

Closed jeffdeville closed 8 years ago

jeffdeville commented 8 years ago

I haven't had a chance to put the specs into this yet, but they are forthcoming. I just wanted to push this up now to begin the conversation on whether this is the right direction, particularly in light of the other PR that also seems to have to do with fetching resources. This was all the configuration I needed for my project (multi-tenant database, so I had to set the prefix on the queries).

That said, I'm not sure that directly using a Repo is something that canary ought to be doing at its core. Perhaps there could be swappable strategies that could be chosen instead? Just a thought.

jeffdeville commented 8 years ago

Sorry, decided that an approach where ecto wasn't included was probably the direction to go.