first commit
This commit is contained in:
23
_rejestracja/core/plugins/Smarty/block.ca.php
Normal file
23
_rejestracja/core/plugins/Smarty/block.ca.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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 '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user