patching ISPConfig: hide unused modules for customer

For our hosting servers we partially rely on ISPConfig as the hosting interface our customers may use to configure their services.

ISPConfig is Open Source, so we don’t have to pay license fees or similar for using the software. But we have to pay by either fixing or properly reporting bugs (or other “features”).

Today, I had to face an issue, which couldn’t be solved otherwise as by patching. If I missed a setting or a GUI control, let me know!

The reseller sells packages to his customers with only mail services. Although the customer may not create any website, use the DNS servers or the VM configuration, the corresponding modules are still displayed in the navigation.

To hide those modules completely, the ISPConfig system user of the customer may be altered and has the modules revoked manually. This cannot be performed by the reseller, so we had to find another way.

With the patch below, a new menu item in the top nav is only appended if the module actually sets its own title in the $module-Variable. If the customer has no appropriate limit, this title is not defined.

To apply the patch, use the following snippet:

<pre class="wp-code-highlight prettyprint linenums:1">cd /usr/local/ispconfig;
patch -p0 <  modulehide.patch

Afterwards, the unused modules aren’t displayed any more in the top navigation. A re-login is not required, just refresh the page.