Topic: Modeling authentication and users
My application requires 4 different kinds of actors:
The only thing that they have in common is that they are human beings who want to use my applications. Their properties, associated objects and related business logic is totally different.
The application consists of four major 'subapplications':
- The b2c application (for probands)
- The b2b application (for managers)
- The ccconsole (for ccoperators)
- The admin console (for administrators)
As these subapplications share the same model and some business logic as long as other resources, it seems natural to implement all three 'subapplications' as part of a single Rails application.
The question is now, how should I efficiently separate authentication. Collapsing all my actors into one model hierarchy seems awkward, as they don't have too much in common. Separating them as first class objects complicates authentication and violates the DRY principle.
What are your ideas ?