Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Security Authorize tag always false

I have about the equivalent to the following in my jsp. Neither here nor there are displayed!

My first foray into Spring Security 3.0.5. I've used 3.0.3 without issue.

<sec:authorize ifNotGranted="ROLE_ACTIVE">
    here
</sec:authorize>
<sec:authorize ifAnyGranted="ROLE_ACTIVE">
    there       
</sec:authorize>
like image 855
Eric Winter Avatar asked Jan 21 '23 12:01

Eric Winter


1 Answers

Thanks for the insights. I found it was because of the ordering of the filter-mappings. Spring security needs to come before Sitemesh.

Not sure how anyone could have gotten that without me publishing so many seemingly trivial details on the project.

I'll know to post the web.xml in the future. Probably just pay more attention to that being a source of problems.

like image 184
Eric Winter Avatar answered Jan 26 '23 18:01

Eric Winter