Multiple user classes
Closed this issue · 3 comments
Would it be possible for the user_class configuration to allow multiple user classes?
E.G.
Monban.configure do |config| config.user_class = 'Users::Business' || 'Users::Employee' end
@damonbakker At the moment, not without reworking it quite a bit. Monban was designed around the idea that there would only be one User class. The doesn't mean I'm adverse to changing this, but I'd really like to see other people's use cases before deciding on what this would look like since I often don't create applications where authentication logic is different for different actors in an application.
@halogenandtoast Thanks for the reply. I understand.
For others wanting to use multiple classes as an addition to an existing application for example. And there isn't time to become independent.
What I did was change the config value depending on the situation.
It's an alternative solution.
@damonbakker I'll still look into this, I'd like for Monban to be abstract enough to handle situations like that, but it was far easier to design around one class, I never really liked the solution Devise came up with, but I can't think of a better one either.