Spring Security issue:- I'm using Spring Security (latest version 3.2.7.RELEASE & Spring Framework version 4.0.9.RELEASE) for my application and I've some condition where I'm not understanding how to give access to both individually. Looking for soonest possible response.
Scenario: I've two different types of users, out of these two TESTER has lower privileges than DEVELOPER
- ROLE_DEVELOPER
- ROLE_TESTER
In my App, through User Interface - I have functionality of update "Analysis" common to both DEVELOPER and TESTER. I wanted to allow DEVELOPER to update only his own "Analysis" (if he login using DEVELOPER access) and TESTER to update his own analysis (if he login using TESTER access). They should be able to only see each others analysis like Read-Only format, but should not be able update each others analysis.
The following are the Spring Security filters which are mapped to the respective RestFul Web Serices (WS), how can I developed to satisfy above both conditions?
Note: I would like to do it using XML configuration only (without annotations)
<intercept-url method="PUT" pattern="/user/update/analysis/**"
access="hasRole('ROLE_TESTER')" />
<intercept-url method="PUT" pattern="/user/update/analysis/**"
access="hasRole('ROLE_DEVELOPER')" />
<intercept-url method="GET" pattern="/user/GET/analysis/**"
access="hasRole('ROLE_DEVELOPER')" />
<intercept-url method="GET" pattern="/user/GET/analysis/**"
access="hasRole('ROLE_TESTER')" />