Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一组 jQuery 选项卡。我只希望这些标签中的一些在它们具有正确的授予权限 impl 时显示。是否可以通过在安全标签中使用 EL 进行检查,还是我需要添加另一个角色并通过它进行检查?
是的,您可以使用 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>