I don't know how safe it is, but I have used velocity in my Menu.vm to do 
the check, and so far it hasn't broken yet :P


        #if ( $data.getACL().hasRole("sales") )
                d.add(1,0,'Orders' ,'$link.setPage("orders,Status.vm")');
                d.add(2,0,'Customers' );
                d.add(3,0,'Inventory');
                d.add(4,0,'Suppliers' );
        #end

        #if ( $data.getACL().hasRole("administrator") )
        // USERS
            d.add(43, 9, 'Users', '$link.setPage("user,FluxUserList.vm")');
            d.add(44, 9, 'Groups', '$link.setPage("group,FluxGroupList.vm")');
            d.add(45, 9, 'Roles', '$link.setPage("role,FluxRoleList.vm")');
            d.add(46, 9, 'Permissions', 
'$link.setPage("permission,FluxPermissionList.vm")');
        #end


I'm using a javascript tree object so that is what the d.add() methods are 
doing. Depending on the user's roles, they get more and more options added 
to their navigation tree.

If anyone has a better solution I would be interested to hear as well.


        Jeffery Painter


On Wed, 22 Oct 2003 David_Solbach/MR/de/[EMAIL PROTECTED] wrote:

> Hi,
> 
> I try to implement a dynamic menu, but creating Menu.java for the Menu.vm 
> in /navigations doesn't help, unfortunately the Java-file isn't called.
> I'd like to dynamicly generate a menu depending on the permissions of the 
> user, listed in the ACL.
> 
> Any suggestions?
> 
> David
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to