Role-based profiling
In the previous section, you have created an example that demonstrates one of the many manners by which a profile set can be associated to a model. In this section we will describe the steps you need to perform in order to implement a role-based portal application.
In the same way you expose profile names and values to portal administrators, you can also define that portlet variability will be driven by the portal user groups. In this option, the mechanism to choose the profile to be applied to a portlet is tightly connected to the portal group a user belongs to.
The principle to serve a variation of your code base depending upon portal user groups bears many similarities to the example you just created.
Let's describe the steps you would perform to implement such an option.
Building portlet for role-based profiling
Concerning portlets, start by identifying the different groups that will be accessing your portlets. Although you do not insert the if, else
, or switch
statements...