我想在jasperserver中更改一些jsp页面,我需要知道的就是:
登录的用户,是否有ROLE_ADMINISTRATOR?
谢谢
发布于 2012-04-27 20:04:23
您可以在jsp文件中使用标记authz:authorize。
示例:
<authz:authorize ifAllGranted="ROLE_ADMINISTRATOR">或者,您可以在配置文件(xml)中使用条件,如以下示例所示:
<condition test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR">decoratorCommonComponents.jsp文件中的代码片段:
<authz:authorize ifAnyGranted="ROLE_ADMINISTRATOR">
<li id="main_logOut" class="last"><a id="main_logOut_link" href="#" onclick="javascript:return false;"><spring:message code="menu.logout"/></a></li>
</authz:authorize>https://stackoverflow.com/questions/10349712
复制相似问题