getName(); $objArrayTemplate[$strActionName] = false; } $objRole = null; foreach ($objArrayRoles as $objRole) { if (in_array($g_strUsername, (array)$objRole->getMember())) { foreach ($objRole->getPermission() as $objArrayPermission) { $objRessource = $objArrayPermission['ressource']; $objAction = $objArrayPermission['action']; if (!isset($g_objArrayUserPermission[$objRessource->getName()])) { $g_objArrayUserPermission[$objRessource->getName()] = array( 'right' => $objArrayTemplate, 'roles' => array()); } $strActionName = $objAction->getName(); $g_objArrayUserPermission[$objRessource->getName()]['right'][$strActionName] = true; if (!in_array($objRole->getName(), $g_objArrayUserPermission[$objRessource->getName()]['roles'])) { $g_objArrayUserPermission[$objRessource->getName()]['roles'][] = $objRole->getName(); } } } } foreach ($g_objArrayUserPermission as $strRessource => $objArrayPermission) { $objRessource = com_borealis_acl_object_Ressource::getByName($strRessource); $g_objArrayUserPermission[$strRessource]['enabled'] = $objArrayTemplate; foreach ($objRessource->getActions() as $objAction) { $g_objArrayUserPermission[$strRessource]['enabled'][$objAction->getName()] = true; } } } if (isset($_REQUEST['action'])) { switch($_REQUEST['action']) { case 'useracl': userACL(); break; } } // ----------------------------------------------- // --- Smarty display // ----------------------------------------------- $g_objSmarty->assign('actions', com_borealis_acl_object_Action::getAll()); $g_objSmarty->assign('username', $g_strUsername); $g_objSmarty->assign('errorUserAcl', $g_strErrorUserAcl); $g_objSmarty->assign('objArrayUserPermission', $g_objArrayUserPermission); $g_objSmarty->display('useracl.tpl'); ?>