Source for file block.securityutil_checkpermission_block.php
Documentation is available at block.securityutil_checkpermission_block.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: block.securityutil_checkpermission_block.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
* Smarty block to implement PN permissions checks in a template
* - component the component under test
* - instance the instance under test
* - level the level of access required
* <!--[securityutil_checkpermission_block component='News::' instance='1::' level=ACCESS_COMMENT]-->
* do some stuff now we have permission
* <!--[/securityutil_checkpermission_block]-->
* @param array $params All attributes passed to this function from the template
* @param string $content The content between the block tags
* @param object $smarty Reference to the Smarty object
* @return mixed the content if permission is held, null if no permissions is held (or on the opening tag), false on an error
if (!isset ($params['component'])) {
$smarty->trigger_error('securityutil_checkpermission_block: attribute component required');
if (!isset ($params['instance'])) {
$smarty->trigger_error('securityutil_checkpermission_block: attribute instance required');
if (!isset ($params['level'])) {
$smarty->trigger_error('securityutil_checkpermission_block: attribute level required');
|