Assigning different roles to a logged in user for a particular module

Hi Everyone.  I am new to mendix and exploring it and now come to a point where I cannot find the right solution to my problem.  Situatuion: I have a project which will be handled by multiple users but a single user can have multiple roles in multiple projects So when I am logged in I want a selector to switch between roles.lets say I am the team lead in one project and developer in another project so when I select teamlead it should show relevant data and when I select developer it should show relavant data.  Hope my question is clear you can ask for clearfication thanks in advance. 
1 answers

Your solution will completely depend on whether you want to use Mendix' user roles to achieve this functionality. If so, you should make a page where users can change their userroles themselves. Check out the Account_New or Account_Edit page for an example on how this is setup for administrators. Keep in mind that this might create a security risk,

Another option is to create similar functionality yourself by creating a new entity and setting XPath constraints on whatever roles are connected to the user's account.