User have multiple user roles

Hi team,   I have created an app in which there is a use case where a user can have multiple user roles. Example: UserRoles (Requestor, Manager and Admin). Admin can add users and can provide all three roles at same time, he can provide any role he wants. Now, when user is going to login the application after login page there will be a choose user role page which consist a dropdown on which user have to make selection that by which user role her wants to login.   I have achieved this by creating associated entity with user entity in first module and when we do the selection of user role then I retrieve the same user role from System. UserRole entity and provide that user role to user.   It is working fine but there is a bug which is suppose the same user has signed in with Requestor userrole on one browser and same user tries to login with manager user role on different browser at same time.   Then there is a problem with the both session of user. How can I overcome this problem that If user login with two different user role on two different browser, it should work fine.   Thanks and Regards, Harshraj Singh
1 answers

Hello Harshraj Singh,


I am afraid that in the most simple solution you need to create multiple accounts for the same user.

Otherwise you are needing to work with multiple booleans on multiple entities which i think will not be feasible and maintainable. 


Hope this helps,


Good luck!