I finally did it by extending the class CustomizePortletSetAction. I put the desired value into the context in the buildNormalContext method of my CustomizePortletSetAction.
Pierre > -----Original Message----- > From: Pierre Henry > Sent: vendredi, 14. mars 2003 10:21 > To: Jetspeed User List (E-mail) > Subject: get user roles from velocity > > > Hi all ! > I am trying to modify the customizer templates so that only > users with some > roles (admin and poweruser) can add or delete portlets/panes, > the other can > only move them around the page. > I would like to do it without modifying the controllers or > any java classes > if possible, just the vm files. > My approach would be to put the vm code for the add portlet > and add pane > button under the condition that the user has one of the > admin/poweruser > roles. > So my question is : how can I get a list of the user roles from > customizer-portletset.vm (something similar to data.user.UserName ?). > If this is not possible, which java class should I extend to > makes this > roles available to the vm ? > > Greetings, > > Pierre >
