[ic] SpecialSub admin_init

Ton Verhagen tverhagen at alamerce.nl
Tue Feb 24 13:23:05 UTC 2009

Dear All,

I am trying to accomplish following:

Providing admin users with their own set of menus based on username.

Contents catalog.cfg:

# Menus based on user
SpecialSub  admin_init  on_admin_init

Sub on_admin_init <<EOS
sub {
#    my $user = $Session->{username};
     my $user = $Values->{mv_username};

     if ($user eq 'john_jones') {
         $Variable->{MV_MENU_DIRECTORY} = 'include/menus/shipping';

Directory 'include/menus/shipping' contains menu files with the same  
name as in the default location (include/menus), with different  
content however.

The variable MV_MENU_DIRECTORY is being set to 'include/menus/ 
shipping' for admin user john_jones, but unfortunately the dedicated  
menus are not shown.

What could cause this (for me) unexpected behavior?

Would there be a better solution to provide users with their own set  
of menus?

Thank you for any pointers.

Best regards,


More information about the interchange-users mailing list