Re: PermissionAdapter troubles

Matt Raible <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
It looks right - have you looked at the PermissionsAdapter in the 
sample app?

Matt

On Jun 21, 2004, at 12:27 PM, Pavlikus wrote:

> Hi all.
> I try to add PermissionAdapter to my menu. But method is isAllowed was
> never called.
>
> Please point out me my mistakes.
>
> Menu-config:
> <Menu name="UserMenu" title="" >
>    <Item name="user-menu.profile" title="user-menu.profile"
>       location="EditProfile.do" roles="Foo-Roles" />
>    <Item name="user-menu.logout" title="user-menu.logout"
>       location="Logout.do" roles="Foo-Roles" />
> </Menu>
>
> Jsp:
> <%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>
>
> <% request.getSession().setAttribute("userMenuAdapter",
>         new foo.bar.UserMenuPermissionAdapter());
> %>
>
> <menu:useMenuDisplayer name="Simple"
>              bundle="org.apache.struts.action.MESSAGE"
>              permissions="userMenuAdapter">
>      <menu:displayMenu name="UserMenu"/>
> </menu:useMenuDisplayer>
>
> Adapter:
> public class UserMenuPermissionAdapter implements PermissionsAdapter {
>
>     private static Log log = 
> LogFactory.getLog(UserMenuPermissionAdapter.class);
>
>     public boolean isAllowed(MenuComponent menu) {
>         log.debug("UserMenuPermissionAdapter - " + menu.getTitle());
>         return true;
>     }
> ...
>
> Method isAllowed is never called. Any advices?
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.