I'm starting a new project which will act as an authorization/authentication server and a simple user management for certain type of users. A user can be a HelpDeskResponsible
, GroupManager
, Employee
, Customer
and more. All these groups members will be able to login with the same form on the web interface. Each model will contain different set of data describing them.
My problem is model design. I am pretty sure I need some User
entity with all data necessary to login and read roles but I don't know how to associate rest of models with user account to easily fetch info about logged-in user. Another problem is users management - given user account is created I'd need to somehow link it to model of one of types I mentioned above.
Is my concept an over-engineering? Are there any solutions for such problem? Maybe I don't need multiple entities for different account types?
Thanks for any advice.
EDIT: Different permission levels are not the bigest problem here - I want to store different info about user depending on a role he belongs to. Customer
will have different dataset than Employee
. I'm pretty sure they are different models but I want to save an ability to login with the same login form.