Results 1 to 5 of 5

Thread: Acegi + menu framework

  1. #1
    Join Date
    Dec 2005
    Posts
    15

    Default 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. #2
    Join Date
    Jan 2006
    Posts
    19

    Default

    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)

  3. #3
    Join Date
    Dec 2005
    Posts
    15

    Default

    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...

  4. #4
    Join Date
    Aug 2004
    Location
    Denver
    Posts
    249

    Default

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

    Matt

  5. #5
    Join Date
    Dec 2005
    Posts
    15

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •