/** * Список ролей * * @return void */ public function rolesAction() { $options = $this->User->getGridOptions('roles'); if ($this->_request->isXmlHttpRequest()) { $rows = $this->User->getRolesList(); $paginator = $this->User->getPaginator(); $this->_helper->json(Phorm_JQuery_DataGrid::data($rows, $paginator, $options)); } else { $this->view->assign('RolesDataTable', $this->view->DataGrid('RolesDataTable', $options)); } }
/** * Пакетное управление доступом к MVC-ресурсам * * @return void */ public function aclAction() { $User = new Phorm_User(); if ($this->_request->isPost()) { $FormData = $this->_request->getPost(); if (isset($FormData['acl']) && is_array($FormData['acl'])) { if ($this->Mvc->updateRolesAcl($FormData['acl'])) { $this->_usersession->UserData = $User->getUserInfo(array('userid' => $this->_usersession->UserData['userid'])); $this->view->assign("Success", array($this->_translate->_('Изменения внесены'))); } else { $this->composeTransactionErrorMessage($this->Mvc->_errors); } } } $this->view->assign('Resources', $this->Mvc->getModulesControllersActions()); $this->view->assign('AclList', $this->Mvc->getAclList()); $this->view->assign('Roles', $User->getRolesList()); }