Wednesday, February 18, 2009

Portlet Personalization, visibility rules using only lower case

In Websphere Portal, we want to hide some portlets in certain pages according to the user's group. Personalization function in the portal can be used for this.

I want to show the portlet if the user is in the group MYUsers. The fullname of the group is CN=MYUsers. Thus I've created a new Rule type Visibility.

Show page or portlet when
current Portal Users.Groups includes CN=MYUsers
Otherwise hide

By applying the rule to the portlet, it should hide the portlet if the login user is not in the MYUsers group. But there are some issue for the above rule. Using an LDAP browser, the group name is CN=MYUsers. But when applying it to the rule, it doesn't seem to be working.

The group name have to be set to lowercase to get it working.

Show page or portlet when
current Portal Users.Groups includes cn=myusers
Otherwise hide

The documentation does not state that the group name have to be in lowercase. Thanks to my colleague, after much trying around, he found that lowercase group name is working.

1 comment:

Anonymous said...

this was very useful - thanks. The
only other example I found was doing visibility based on day of the week.