ok thanks. It seems to me that the JetspeedSecurity class should have been exposed as a velocity data structure like $!data and $jslink.
on a related note, any problem with replacing all the VM controls and controllers with JSPs? > -----Original Message----- > From: Pernoud Aurelien [mailto:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 3:01 AM > To: Jetspeed Users List > Subject: RE: Getting a user's role in Velocity > > A way to do it would be to use an aplication tool, and then > define it in js.pr : > > tool.request.mytool=com.mycompany.myapp.jetspeed.util.MyTool > > public class MyTool implements ApplicationTool { > > public boolean hasRole(String username, String rolename) > throws Exception > { > return JetspeedSecurity.hasRole(username,rolename); > } > > ... > > See org.apache.jetspeed.util.template.JetspeedTool for example. > > Aurelien > > Fletcher, Boyd C. J9C534 a �crit : > > > Is there a way to test if a user is in a role in a velocity > template? > > > > something like hasRole(username,rolename). > > > > Also is there a list of the functions and data structures > availbale to > > Velocity? I.e. the $!user > > > > thanks, > > > > boyd > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
