Announcement Announcement Module
Collapse
No announcement yet.
intercept-url: method attribute don't work! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • intercept-url: method attribute don't work!

    Hi everyone.

    I'm trying to secure my application by defining some intercept-url pattern.

    But when I specify the method attribute, the intercept-url was ignored.

    For example, this works:

    Code:
    <intercept-url pattern="/test/**" access="hasAnyRole('ROLE_ADMIN', 'ROLE_TECH')"/>
    But when I add the method attribute:

    Code:
    <intercept-url pattern="/test/**" method="DELETE" access="hasAnyRole('ROLE_ADMIN', 'ROLE_TECH')"/>
    <intercept-url pattern="/test/**" method="PUT" access="hasAnyRole('ROLE_ADMIN', 'ROLE_TECH')"/>
    the rule is ignored.

    I found a solution that tells to put httpMethodFilter before springSecurityFilterChain in web.xml file.. but it doesn't work.

    I'm using Spring Roo 1.0.2.RELEASE and spring.framework.security 3.0.3.RELEASE.

    Thank you for any answer!

    Marco

  • #2
    I have the same problem using this schema:

    <beans:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.1.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

    Comment

    Working...
    X