How would I write following condition using spring security taglib?

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<sec:authorize access="not of hasRole('ROLE_ADMIN')">
   <div> show these for only non admins </div>
</sec:authorize>
有帮助吗?

解决方案

<sec:authorize access="!hasRole('ROLE_ADMIN')">
   <div> show these for only non admins </div>
</sec:authorize>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top