Here you go...
Matt Raible wrote:
> Are you using a Velocity menu? If so, can you post the template to
> this list?
>
> Matt
>
> On 6/1/07, Bryan Noll <[EMAIL PROTECTED]> wrote:
>> I just dropped in the new jar file, and I'm no longer
experiencing
>> the same problem, but a different one.
>>
>> Now, when the policy manager logs in, they get the ENTIRE
>> administration menu. In a sense, the problem reversed itself -
>> logging in as policy manager used to correctly show only the
Policy
>> menu item, but then logging in as admin would still only yield
the
>> policy menu item... now, everyone gets the full admin menu.
>>
>> Any ideas why this might be happening?
>>
>>
>>
>> Bryan Noll wrote:
>> > OK... I'll give that a try and report back...
>> >
>> > Thanks..
>> >
>> > Matt Raible wrote:
>> >> This was a bug we fixed in Struts Menu a while back. What
version are
>> >> you using? Can you try the attached JAR (I'm hoping to release
>> today)
>> >> and see if it fixes the problem?
>> >>
>> >> Thanks,
>> >>
>> >> Matt
>> >>
>> >> On 6/1/07, Bryan Noll <[EMAIL PROTECTED]> wrote:
>> >>> So my problem is this:
>> >>>
>> >>> I've got a menu config that looks like this:
>> >>>
>> >>>
>> >>> <?xml version="1.0" encoding="UTF-8"?>
>> >>> <MenuConfig>
>> >>> <Displayers>
>> >>> <Displayer name="Velocity"
>> >>> type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
>> >>> </Displayers>
>> >>> <Menus>
>> >>> <Menu name="MainMenu" title="mainMenu.title"
>> >>> page="/mainMenu.html" roles="admin,user,default"/>
>> >>> <Menu name="AdminMenu" title="menu.admin"
>> >>> page="/users.html"
>> >>> roles="admin,view_users,view_groups,view_policies" width="120">
>> >>> <Item name="ViewUsers" title="menu.admin.users"
>> >>> page="/users.html" roles="view_users"/>
>> >>> <Item name="ViewGroups" title="menu.admin.groups"
>> >>> page="/groups.html" roles="view_groups"/>
>> >>> <Item name="ViewPolicies" title="menu.admin.policies"
>> >>> page="/policies.html" roles="view_policies"/>
>> >>> <Item name="UpdateManager" title="menu.admin.updates"
>> >>> page="/updateManager.iface" roles="run_update_manager"/>
>> >>> </Menu>
>> >>> </Menus>
>> >>> </MenuConfig>
>> >>>
>> >>>
>> >>> which is invoked in a jsp file like so:
>> >>>
>> >>> <menu:useMenuDisplayer name="Velocity"
>> >>> config="WEB-INF/classes/cssHorizontalMenu.vm"
>> >>> permissions="rolesAdapter">
>> >>> <ul id="primary-nav" class="menuList clearfix">
>> >>> <li class="pad"> </li>
>> >>> <menu:displayMenu name="MainMenu"/>
>> >>> <menu:displayMenu name="AdminMenu"/>
>> >>> </ul>
>> >>> </menu:useMenuDisplayer>
>> >>>
>> >>>
>> >>> The problem I'm experiencing is this. I log in as an admin
>> (which has
>> >>> all of the roles listed in the menu config) and I get all of the
>> menu
>> >>> items, as expected. Then I log in as a Policy Manager, which
>> only has
>> >>> the "view_policies" and "default" roles. As expected, I get the
>> main
>> >>> menu, but only the policies item under the Admin menu. Here's
>> where it
>> >>> gets weird: I log out, and log back in as admin, but I still only
>> get
>> >>> the policy item on the menu, as though I was logged in as a
policy
>> >>> manager.
>> >>>
>> >>> To make matters worse, once this has taken place, ANYONE who
logs in
>> >>> from ANY MACHINE gets only the policy menu. The only way to fix
>> >>> this is
>> >>> to restart the server.
>> >>>
>> >>> Any ideas?
>> >>>
>> >>>
>> >>> Thanks in advance...
>> >>>
>> >>> Bryan
>> >>>
>> >>>
>> ---------------------------------------------------------------------
>> >>> 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]
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
#macro( displayCssMenu $menu )
## set menu title
#set ($title = $displayer.getMessage($menu.title))
#if (!$menu.url) #set ($url="#") #else #set ($url=$menu.url) #end
## create a single menu item
#if ($menu.components.size() == 0)
#if ($velocityCount == $menu.parent.components.size())
<li class="last">
#else
<li>
#end
#if ($menu.name == $currentMenu)
<a href="$url" title="$title" class="current"
#if($menu.target)target="$menu.target"#end#if($menu.width)style="width:
${menu.width}px"#end>${title}</a>
#else
<a href="$url" title="$title"
#if($menu.target)target="$menu.target"#end#if($menu.width)style="width:
${menu.width}px"#end>${title}</a>
#end
#else ## create multiple menu items in a menu
<li class="menubar">
<a href="$url" title="$title" #if ($menu.name ==
$currentMenu) class="current"
#end#if($menu.target)target="$menu.target"#end#if($menu.width)style="width:
${menu.width}px"#end>${title}</a>
#end
#if ($menu.components.size() > 0)
<ul>
#foreach ($menuIt in $menu.components)
#displayCssMenu($menuIt)
#end
</li>
#else
</li>
#if ($velocityCount == $menu.parent.components.size())
</ul>
#end
#end
#end
#displayCssMenu($menu)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]