Announcement Announcement Module
Collapse
No announcement yet.
roles? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • roles?

    hi,

    i have user roles tables in my database, which contains roles like 'ROLE_ADMIN' and 'ROLE_USER', and in applicationContext-security.xml, i defined the filterSecurityInterceptor as:


    <bean id="filterSecurityInterceptor" class="org.springframework.security.intercept.web. FilterSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager" />
    <property name="accessDecisionManager" ref="accessDecisionManager" />
    <property name="objectDefinitionSource">
    <s:filter-invocation-definition-source>
    <s:intercept-url pattern="/rpc/userService" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    <s:intercept-url pattern="/rpc/adminService**" access="ROLE_ADMIN"/>
    <s:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </s:filter-invocation-definition-source>
    </property>
    </bean>

    however when i tried to access some resource as admin user, it got rejected. how should i define the ROLE in the access?
Working...
X