security authorize tag

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

security authorize tag

kossel
Hi all

I have added some custom menus in menu.jsp (no doing in menu-config.xml because I would like to add some glyphicon, and struts menu can't do it)

so for hide/show menus I wanted to use  spring security authorized tag

<security:authorize access="hasRole('ROLE_ADMIN')">
                         <li>
                            <a href="test.jsp"><i class="fa fa-edit fa-fw"></i> Forms</a>
                        </li>
</security:authorize>


but this tag causes Yike! error,  and nothing showed in the console. even I have 

<Logger name="org.springframework.security" level="all"/>
<Logger name="org.springframework" level="all"/>

in log4j2.xml.

If I switch to  <security:authorize ifAnyGranted="ROLE_ADMIN">  it works as expected. however as far as I know, ifAnyGranted is deprecated.

I'm curious why I see no error in output console?

I'm using appfuse 3.5  springMVC
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: security authorize tag

mraible
Administrator
You might try posting this question to the user mailing list. This list is for the development of the framework itself and the user list has more traffic. You can also try posting to Stack Overflow with an "appfuse" tag.

Thanks,

Matt

On Wed, Apr 1, 2015 at 10:07 AM Yichao Zhu <[hidden email]> wrote:
Hi all

I have added some custom menus in menu.jsp (no doing in menu-config.xml because I would like to add some glyphicon, and struts menu can't do it)

so for hide/show menus I wanted to use  spring security authorized tag

<security:authorize access="hasRole('ROLE_ADMIN')">
                         <li>
                            <a href="test.jsp"><i class="fa fa-edit fa-fw"></i> Forms</a>
                        </li>
</security:authorize>


but this tag causes Yike! error,  and nothing showed in the console. even I have 

<Logger name="org.springframework.security" level="all"/>
<Logger name="org.springframework" level="all"/>

in log4j2.xml.

If I switch to  <security:authorize ifAnyGranted="ROLE_ADMIN">  it works as expected. however as far as I know, ifAnyGranted is deprecated.

I'm curious why I see no error in output console?

I'm using appfuse 3.5  springMVC
Loading...