This reverts commit 7ef04be.
this abstraction still needs to be worked in to the rest of the project, but the idea is to uncouple the structure of the configuration from how it's being called in the project.
This reverts commit 66adcf1.
This abstraction will allow us to specify a class to handle authorizing access to the controller/view rather than using the lambdas. This becomes more important as configuration becomes more complex and the need to be able to test guards becomes more important.
cleans up SwitchUser move provider operation closer to the providers
* seems like a better place for the logic. UserLoader takes an input and returns a user * reduces what the controller needs to 'know' * I'm still not happy with the name 'UserLoader' * is prepare the right name for the class method ?
- use provider to retrieve the current_user and remove logic from helper - don't look up current_user on each scope iteration
login_exclusive is more descriptive than the previous controller code improves test coverage
move in to SwitchUser as it is much easier to test
fixes error raise by SwitchUserController#provider_class autoload wasn't finding the constant Provider Provider wasn't namespaced under SwitchUser, so it was poluting the namespace