In this example, suppose neither users nor administrators have been trained to work with Domains, and to prevent users from accidentally creating Domain resources, system administrators decide to remove any reference to Domains in the UI.
![note-icon-ns_28x28.png.5ad9193279edfc126876679aabf6978a.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | Removing Domains from the menu hides Domains but does not disable them. Users can still access Domains by entering the URI of the Domain webflow. See Working With Custom Java Classes for information on how to restrict a webflow. |
To remove the Domain menu items:
| 1. | Edit the file <js-webapp>/WEB-INF/actionModel-navigation.xml. This file defines the main menu visible by default on all pages of the server. The XML that defines the actionModel, contains many condition tests that determine when each menu and menu item should be displayed. |
![note-icon-ns_28x28.png.45ab1165f5dc51a6a8740c518ffd82df.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | “Mutton” is a term that means menu-button, and designates a button that creates a drop-down menu. |
| 2. | Find the section at the end for the Create menu and insert comments to remove the last menu item, as shown in the code sample above. |
| 3. | Edit the file <js-webapp>/WEB-INF/actionModel-search.xml. This file defines the context menu items visible when users right-click folders and resources in repository listings. |
| 4. | Find the section at the top of the file that creates the Add Resources sub-menu. Then add comments to remove the lines that define the Add Resources > Domain menu item, as shown in the code sample above. |
| 6. | When the web app has reloaded, log into JasperReports® Server as jasperadmin. Click the Create menu and right-click a folder in the repository. In both cases, the menu item for Domain is no longer available. |
![note-icon-ns_28x28.png.81182c4cd5a2feccb6fb10b93450ff51.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | When you remove a menu item, it is removed for all users, even administrators. It's often preferable to prevent only non-administrators from viewing a menu item, as shown in the next section. |
Recommended Comments
There are no comments to display.