I want to change some jsp pages in jasperserver, and all my need to know is :
the logged user, have ROLE_ADMINISTRATOR or not ?
thanks
I want to change some jsp pages in jasperserver, and all my need to know is :
the logged user, have ROLE_ADMINISTRATOR or not ?
thanks
You can use tag authz:authorize
in jsp file.
The example:
<authz:authorize ifAllGranted="ROLE_ADMINISTRATOR">
Or you can use condition in configuration files (xml) like in this sample:
<condition test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR">
The snippet from decoratorCommonComponents.jsp file:
<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>