Re: PermissionAdapter troubles [again]
Matt Raible <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
| Newsgroups | gmane.comp.java.struts-menu.user |
|---|---|
| Message-ID | <[email protected]> |
Are you *sure* it's not being called - and that your logging
configuration is setup correctly? You might try using
System.out.println to ensure that logging is not the problem.
Matt
On Jun 22, 2004, at 5:58 AM, Pavlikus wrote:
> Hi all.
> I post it again here... My IPS mail server was down for a last day.
> So, I can't recieve any answers from you.
>
>
> I try to add PermissionAdapter to my menu. But method "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