PermissionAdapter troubles [again]

Pavlikus <[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Organization home
Message-ID <[email protected]>
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
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.