Closed qgadrian closed 8 years ago
If you use load_and_authorize_resource
, the resource will be present already. I'm probably missing something, but what does this solve that load_and_authorize_resource
does not?
Actually it does not. I misunderstood the load resource method and thought that it would load the session user, mixing concepts between Guardian
and Canary
. Sorry!
I'll close de PR.
Glad I could help!
@qgadrian I updated the README to be less confusing about what resource is being loaded in each case.
Now it won't be confusing anymore.
Thank you @cpjk!
Since might be necessary a loaded resource from the model id, I think it should be added to conn.assigns.
The problem is that, using Guardian, there is already a current_user from the
jwt
. But you cannot access to the requested resource if you are requesting another user.