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]

Reply via email to