Skip to Content

In August 2006 I wrote a blog about a method for performing role assignment in the SAP NetWeaver Portal based upon certain user characteristics. The example I used was the case where a user got a different role depending on the portal language they chose.

In the portal forums this often led to questions about how the same logic could be adopted to handle a situation where a user had to agree to certain conditions before they were assigned a role.

The following code can do just that.

It is assumed that a user is initially assigned a role which has a single iView. That iView is based on the following portal component. When the user navugates to this iView, they are presented with a number of statemenst that they must agree to before the “OK to continue” style button is activated.

Once the button is selected, a second “real” role is assigned, and the first role deassigned from the user. The portal application is restarted, causing the user to see the new “real” role’s contents.

This example has three conditions of a frivolous nature. The number of conditions is delared as a static int and the conditions themselves are held in a String array.

The result might look like this:


The button will only become enabled when all the checkboxes have been checked on.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member

    How can we use this for everytime logon? For example if in my company wants to use a disclaimer how can we use it for everytime users try to login??


  2. Former Member

    While deploying my application to the portal, which configuration setting to be done.

    Do i need to create a seperate iView?

    Looking forward to your reply!!!
    Thanks and Regards,

    1. Former Member Post author
      Hi Prashil

      Yes, you make an iView from the component and add it the portal role pcd:portal_content/demo/initial, or some other role. Give this role to your new users. When they have marked the boxes they get the role pcd:portal_content/demo/realrole. These are of course only dummy names – you would have your own roles.



Leave a Reply