schrockwell/bodyguard

Fix user option for Bodyguard.Plug.Authorize

schrockwell opened this issue · 1 comments

Need to do something smarter about the user option in the Bodyguard.Plug.Authorize plug module. Since the init/1 callback happens at compile-time, we can't provide functions as options because they can't be unwrapped.

The easiest solution is change it to a {module, function} tuple that gets the current user from the conn.

Never mind - seems to work okay!