"Fossies" - the Fresh Open Source Software Archive

Member "docs/techref/frontend/frontend.protectedcategories.html" (12 Oct 2016, 3211 Bytes) of package /linux/www/CONTENIDO_4.9.12.zip:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Author Timo A. Hummel
Created 20th May 2005
Audience Site Integrators, Module Developers
Applies to CONTENIDO 4.6 or later


CONTENIDO 4.6 introduces a updated concept for protecting frontend categories and enabling access to them.

Installation and configuration

Download the plugin "Frontend Category Permissions" from the CONTENIDO website. Extract the archive to your plugins directory. Open (or create) the file config.plugin.php in the directory contenido/plugins/chains/includes/ and add the necessary includes and chain entries (see below). Afterwards, open the file config.local.php in your contenido/includes directory (create the file if it doesn't exist) and add the following line at the end:

NOTE: Since CONTENIDO 4.9 this file has been moved to data/config/{environment}/ directory.

= "category";

Example config.plugin.php:

global $_cecRegistry;
cInclude("plugins", "chains/includes/include.chain.frontend.cat_backendaccess.php"); cInclude("plugins", "chains/includes/include.chain.frontend.cat_access.php"); $_cecRegistry->addChainFunction("Contenido.Frontend.CategoryAccess", "cecFrontendCategoryAccess"); $_cecRegistry->addChainFunction("Contenido.Frontend.CategoryAccess", "cecFrontendCategoryAccess_Backend"); ?>

The chain Contenido.Frontend.CategoryAccess is called everytime a protected category is accessed. If the chain functions return true, access is granted. The function cecFrontendCategoryAccess validates frontend users and their permissions, and cecFrontendCategoryAccess_Backend does the same for the backend user counterparts. If you wish to disable backend users for access frontend categories, remove the line which contains cecFrontendCategoryAccess_Backend. You can also define chains for more custom checks, please refer to the chains documentation for more information.