Actually role permissions do work for 2.4.2, but only at the top level, not
at submenu or item level.

Also, removing a functionality that used to work in older versions is not
such a good thing .

Regards

Dev

mraible wrote:
> 
> In 2.4.2, we expect you to do the permissions checking your template.
> For example:
> 
> #macro( displayCssMenu $menu )
>   #if ($displayer.isAllowed($menu))
>     ## set menu title
> 
> I tried to do it by cloning, but my head started to spin after trying
> for several hours and I finally gave up. It's probably possible, but
> I'm not smart enough to implement it. ;-)
> 
> Matt
> 
> On 3/14/07, devg <[EMAIL PROTECTED]> wrote:
>>
>> It is related but not exactly the same. I did find the problem for
>> strutsmenu
>> 2.4.1 (it is still broken for 2.4 and 2.4.2).
>>
>> For strusmenu 2.4.1, VelocityMenuDisplayer.java clones the menuComponent
>> object before removing components that are 'not allowed' (line 152). The
>> problem is that cloning the top level menu is not good enough, you need
>> to
>> clone the whole tree. Otherwise when the 'not allowed' components are
>> removed (line 192), they remain removed for all roles.
>>
>> In 2.4.2 this whole cloning/checking for role privilege has been removed
>> for
>> menu items, so it does not work at all.
>>
>> Regards
>>
>> Dev
>>
>>
>> mraible wrote:
>> >
>> > This might be related to the following bug:
>> >
>> > http://issues.appfuse.org/browse/APF-599
>> >
>> > Matt
>> >
>> > On 3/14/07, devg <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I am using Appfuse 1.9.2 . I have the following menu defined:
>> >> <Menu name="PartNoMenu" title="menu.PartNo"
>> roles="admin,user,marketing">
>> >>      <Item name="PartNoGenMenu" title="partNoGen.title"
>> >> page="/pgenerator.jsp"/>
>> >>       <Item name="PartNoConfigMenu" title="partNoCfg.title"
>> >> page="/pconfig.jsp" roles="marketing,admin"/>
>> >> </Menu>
>> >> I was initially using StrutsMenu 2.4 the role permissions work fine
>> for
>> >> the
>> >> three roles (admin, user, marketing) , but the menu for role user gets
>> >> messed (the menus following this one show up under the last item).
>> >>
>> >> So I switched to StrutsMenu 2.4.1,  once I log in as role 'user' and
>> then
>> >> log back in as admin or marketing - the second menu item no longer
>> shows
>> >> (it
>> >> should show for marketing and admin but not for user).The follwoing
>> menus
>> >> look fine (unlike 2.4.0)
>> >>
>> >> So I tried StrutsMenu 2.4.2 - now the permissions for menu items don't
>> >> work,
>> >> both the items show for all three roles (should not show for user).
>> >>
>> >> Any ideas ? (I can not upgrade Appfuse because I need to stay at this
>> >> version of spring)
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Role-list-with-StrutsMenu-tf3405029s2369.html#a9484191
>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > http://raibledesigns.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Role-list-with-StrutsMenu-tf3405029s2369.html#a9486993
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Role-list-with-StrutsMenu-tf3405029s2369.html#a9939830
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to