Jump to content
We've recently updated our Privacy Statement, available here ×

remove icons in RepositoryExplorer


pwpwpw

Recommended Posts

Hi,

 I'm trying to remove some icons in the repository explorer by modifying repositoryExplorer.jsp.  For example, i want to remove Schedule Reports icon and Run in Background icon by using the <authz:authorization> tag to only allow ROLE_ADMINISTRATOR to use those features.    This works, but it breaks the javascript(repositoryExplorer.js) that sets the other icons to either _enabled.gif or _disabled.gif, so everything else down the line ends up with enabled.gif by default.    So it seems I would also have to modify repositoryExplorer.js

Is there a proper way of setting security around those icons?

 

Thanks,

pw

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

We disabled certain icons for certain roles within this jsp. The key is to ensure that the display style is set to none for users who shouldn't see the icon otherwise you'll get javascript errors. Shouldn't need to mess with the js file.

i.e. to display the open in Designer button for a certain role(s)

<authz:authorize ifAnyGranted="SOME_ROLE">
  <td style="cursor: pointer;" width='50' height='50' onClick='' id='design_td' align="center">
     <a href='#' class='normalpx' id='design_td_a'><img src="images/design_enabled.gif" border='0' title='<spring:message code="RM_BUTTON_DESIGN" javaScriptEscape="true"/>' id='design'  /></a>
    </td>
</authz:authorize> 

Then for users who don't have the role you need to set display:none


<authz:authorize ifNotGranted="SOME_ROLE">
    <td style="cursor: pointer; display: none;" width='50' height='50' onClick='' id='design_td' align="center">
         <a href='#' class='normalpx' id='design_td_a'><img src="images/design_enabled.gif" border='0' title='<spring:message code="RM_BUTTON_DESIGN" javaScriptEscape="true"/>' id='design' /></a>
    </td>
</authz:authorize>

I think this is correct, it's been a while since I made this change so may not be quite right.

Hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...