Issue Description:A customer wants to hide the Library Icon conditionally based on a user's role. Resolution:To hide the library icon for all users you'll need to modify the decorator in /WEB-INF/decorators/decorator.jsp. Find and remove the tags: | [toc] |
<li id="main_library" tabIndex="-1" class="leaf"> <p class="wrap button"> <span class="icon"></span> <spring:message code="menu.library"/> </p> </li>
The above would hide for all users. To conditionally show the icon to a particular role, wrap the above tags with our js:authorize tag, like:
<js:authorize ifAllGranted="ROLE_SUPERUSER"> <li id="main_library" tabIndex="-1" class="leaf"> <p class="wrap button"> <span class="icon"></span> <spring:message code="menu.library"/> </p> </li> </js:authorize>
This was originally created for 5.1, but it still applies in 5.5 as well.
Reference:
Chapter "11.7 Customizing Menus" in our JasperReports Server Ultimate Guide v5 in our Documents Area
Ref. Case #00032944
Recommended Comments
There are no comments to display.