<?php
/**
 * @author mabi
 */

function smarty_block_ca($params, $content, &$smarty, &$repeat) {


	$user = $smarty->get_template_vars(Admin::SMARTY_NAME);
	if(isset($params['role'])) {
	    $role = $params['role'];
	} else {
	    $role = Admin::SMARTY_DEFAULT_ACCESS;
	}
	$access = $user->CheckAccess($role);

	if($access) {
	    return $content;
	} else {
	    return '';
	}
}
?>