Announcement Announcement Module
Collapse
No announcement yet.
Acegi + menu framework Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Acegi + menu framework

    I am new to Spring and Acegi so my question could sound stupid.

    I am working on some web project. I use Spring and Acegi. I have user menu on the pages. I am looking for some framework that can recognize currently logged user and print menuitems that user has rules for.

    I heart about Struts menu. But I do not know how to wire it with Acegi and Spring.

    I know I can use Acegi tag authorize
    Code:
    <authz:authorize ifNotGranted="ROLE_USER">
    	<p><a href="<c:url value="/login.htm"/>"><spring:message
    		code="menu.login" /></a></p>
    </authz:authorize>
    But is seems to me tedious.

    I would like to have menu definition in xml file - like Struts menu have.

    Thanks for any help.

  • #2
    add the
    <bean id="remoteUserFilter"
    class="net.sf.acegisecurity.wrapper.ContextHolderA wareRequestFilter"/>
    to the "filterChainProxy" which helps you hold your roles.

    and you then you can set "roles" in struts-menu(menu-config.xml)

    Comment


    • #3
      Thanks for reply.

      I start to use Struts menu a week ago. I work great.

      Maybe I should look in Struts menu user guide

      Code:
      <c:url value="/some_url"/>
      url jstl tag can transform this absolute url address...so it links right in any symbolic subfolder or page the website visitor is. But I didn`t find out how do this using Struts menu...

      Comment


      • #4
        If you use the "page" attribute, it'll pre-pend the context path for you.

        Matt

        Comment


        • #5
          Originally posted by mraible
          If you use the "page" attribute, it'll pre-pend the context path for you.

          Matt
          I already found this attribute. But thanks for your help.

          Comment

          Working...
          X