我有一组jQuery标签。我只想要一些这些标签在他们拥有正确的授权权限时显示。是否可以在安全标签中使用EL进行检查,还是需要添加其他角色并进行检查?
答案 0 :(得分:1)
是的,您可以使用EL:
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<sec:authorize access="hasRole('authority_name_you_want_to_check_for')">
content conditional on having required authority
</sec:authorize>