Fork me on GitHub

Hide URL Rewriter for non-admins

Sometimes it is desired to hide the URL Rewriter for all users except those with admin rights.
By default both authors and editors can create rules, but only editors, and thus admins, can enable them.

This page describes how to hide the URL Rewriter section from the Browse Workspace for non-admins.

Make a domain rule in xml

Copy the following xml and save it as hide-urlrewriter-section.xml

<?xml version="1.0"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="hide-urlrewriter-section">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>hipposys:facetrule</sv:value>
  </sv:property>
  <sv:property sv:name="hipposys:equals" sv:type="Boolean">
    <sv:value>false</sv:value>
  </sv:property>
  <sv:property sv:name="hipposys:facet" sv:type="String">
    <sv:value>cluster.name</sv:value>
  </sv:property>
  <sv:property sv:name="hipposys:filter" sv:type="Boolean">
    <sv:value>true</sv:value>
  </sv:property>
  <sv:property sv:name="hipposys:type" sv:type="String">
    <sv:value>String</sv:value>
  </sv:property>
  <sv:property sv:name="hipposys:value" sv:type="String">
    <sv:value>cms-tree-views/urlrewriter</sv:value>
  </sv:property>
</sv:node>

It represents a domain rule, see here on onehippo.org.

Import the domain rule

Import the hide-urlrewriter-section.xml at this location:

/hippo:configuration/hippo:domains/frontendconfig/frontend-plugins

You can either do this manually on an existing repository or take the file up in your project's content module.