Reputation:
I have list of users which have multiple roles. I am looking basically opposite of hasAuthority('systemAccessRole') for example if user have systemAccessRole i want to block him on some url.
<sec:intercept-url pattern="/url/global/*" access="hasAuthority('systemAccessRole')"/>
// user will not allowed to access domestic url if he/she has role systemAccessRole
<sec:intercept-url pattern="/url/domestic/*" access="hasAuthority('systemAccessRole')"/>
What would be a expression i can use in that case ?
Upvotes: 0
Views: 380
Reputation: 16644
Use the !
(not
) operator:
<sec:intercept-url pattern="/url/domestic/*" access="!hasAuthority('systemAccessRole')"/>
Upvotes: 0