[ic] SpecialSub admin_init
Mike Heins
mike at perusion.com
Tue Feb 24 15:07:34 UTC 2009
Quoting Ton Verhagen (tverhagen at alamerce.nl):
> 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';
Try instead:
unshift @{$Config->{TemplateDir}}, 'include/menus/shipping';
> }
> }
> EOS
>
> 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,
>
> Ton
>
>
>
>
>
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.328.4479 tollfree 800-949-1889 <mike at perusion.com>
Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer
More information about the interchange-users
mailing list