Jump to content

Recommended Posts

Posted

Hello everyone,

I want to customize my jasper server interface to hide / disable some buttons in the repository menu.

I have already hide some options when I right-click on a ressource (copy and schedule) but I don't know how to hide / disable action buttons on top of the page :

/sites/default/files/user_uploads/jeanpierrepolnareff91/jasper_com_question_customize_jasper_ui.png

Do you have any idea to solve my problem ?

Thanks for your attention,

Jean-pierre

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution
Posted

If you simply want to hide it permanently, I think you can do it with 'overrides_custom.css' using the theme file.

Changing the UI With Themes
https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/changing-ui-themes
  -->Hiding UI Elements
     https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/hiding-ui-elements

- Default theme is enabled.
w20211107_css_image1.png.eca7d8b4f6e835ce02c07b067510bc1e.png


- Image of the display when the custom theme is enabled (copy is hidden)
w20211107_css_image2.png.a27d348579fe10bfb337e89d81af7531.png

 

- Example of 'overrides_custom.css' in the above example (Not guaranteed to work. It may affect other items as well)

#copy {  display:none;}


I hope this is useful to you.

 

Posted

Thanks for your answer yama !

I managed to hide the copy button in a specific theme which I called "no_copy_theme" and I redirect the user to this theme during his login

if he have the role "ROLE_USER" and not "ROLE_ADMINISTRATOR" (modified WEB-INF/jasperserver-servlet-pro.xml)  :

no_copy_button_if_role_user.png.c2e3e72619d1bcb0724e15323d197b90.png

EDIT : I found a method to hide items of the repository menu based on roles (ROLE_ADMINISTRATOR, ROLE_USER, ...) 

You need to modify the "WEB-INF/jsp/templates/container.jsp" file and replace the content of the subheader to only keep what you need.

Here, I have replace the copy button by "nothing" to delete it :

hide_repository_copy_menu_based_on_role.png.b8d890435147ff2c324a028892227a7e.png

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...