Search code examples
aspnetdb

aspnet with multiple roles - how to set only 1 role active at a time


I'm having a problem with aspnet having multiple roles functionality. The system allow a user to have 2 or more roles,for example he could both be team lead and a manager, but these 2 roles have 2 different set of functionality. In aspnet, Roles class has some methods to get all the current roles for the user, but what if I'm required to select only 1 active role at a time?

Any suggestion?

Thanks,
czetsuya


Solution

  • There is no default implementation for Role selector. So what I did was after a user successfully login, show a dialog box of roles for that user. And store the selected value on session.