How user can choose which role to login with?


Here’s my scenario:

I have a user who has two different roles. And during login he wants to decide which role should he login as.

We are trying to use skin/start page/shell rules to reach this functionality. But then what and how to pass Request parameters from the login page so as to identify them in start page rules?

Also, how to read read values from request parameters?

In Start page rules, it gives something as #{request.parameterNames}. How do I read a value of request parameter name “Application” using this?

Any other approach to implement this functionality is welcome.

MWS doesn’t promote the idea of user’s logging in with different selected roles. Instead, they login and that user has all of the roles that they are configured to have. If you want to have different skin/shell/etc based on user’s roles then you should create those skin/shell/etc rules in priority order.

The start/skin/etc rules have access to params with the array syntax: {request.param[“foo”])

See the javadocs on ServletRequest: ServletRequest (Java EE 6 )