Thoughts Electrique

Restrict visibility of OpenCms templates to certain folders

Since I’m currently working on an OpenCms mutli site solution I was looking for a possibility to restrict the available templates of a site. I know this can be done via permissions but the manual implementation of this is rather painful. I’m currently in the process of extending the OpenCms security manager to take care of this but while doing this I found an (to me) unknown feature.

By usage of the property folders.available (you might have to define it first) on a template you can specify a list of comma seperated folders in which the template is available (in the dropdown).

Unfortunately this property works only on file level and can not be inherited via the folder hierarchy. Also it does not provide a secure solution since the template can always be set via the advanced property dialog.

But you never know when a feature could come in handy.

Tags: , , ,

One Response to “Restrict visibility of OpenCms templates to certain folders”

  1. S. Prousteau Says:

    Hi,
    I can see on http://www.opencms.org/en/news/091001_v751_releasenotes.html that a new feature is “Added option to hide “Advanced” button of property dialog depending on the current users groups”. Do you how it works?

    PS: Great blog! But no search form, nor mail’alert function…

Leave a Reply