summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers')
-rw-r--r--application/modules/user/controllers/BootmenuController.php3
-rw-r--r--application/modules/user/controllers/PersonController.php2
-rw-r--r--application/modules/user/controllers/RoleController.php28
3 files changed, 17 insertions, 16 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index 1ad2997..e3513e0 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -106,9 +106,8 @@ class user_BootmenuController extends Zend_Controller_Action
$pagination->setElement($bootmenu);
$pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/bootmenu/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $bootmenu = $pagination->getElements();
+ $bootmenu = $pagination->getElements();
- $this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
$this->view->bootmenulist = $bootmenu;
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index c1e76d3..ff5517c 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -63,7 +63,6 @@ class user_PersonController extends Zend_Controller_Action
$this->view->groupRequestRight = Pbs_Acl::checkRight('grm');
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->leaveRight = Pbs_Acl::checkRight('gl');
- $this->view->overviewRight = Pbs_Acl::checkRight('pso');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
}
@@ -340,7 +339,6 @@ class user_PersonController extends Zend_Controller_Action
$this->view->personID = $personID;
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->deleteRight = Pbs_Acl::checkRight('pd');
- $this->view->overviewRight = Pbs_Acl::checkRight('pso');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
} else {
$this->_helper->redirector('', 'person');
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 4e0aa52..88e2eeb 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -303,20 +303,24 @@ class User_RoleController extends Zend_Controller_Action
}
if(count($rightlist) > 0) {
if (!isset($_POST["link"])){
- $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist, 'roleID' => $roleID));
+ $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist));
} else {
- $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist, 'roleID' => $roleID), $_POST);
+ $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist, $_POST));
if ($linkForm->isValid($_POST)) {
- $rightroles = new Application_Model_RightRoles();
- $rightroles->setRightID($_POST['rightID']);
- $rightroles->setRoleID($roleID);
- try {
- $this->rightRolesMapper->save($rightroles);
- } catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
+ foreach($_POST['rights'] as $rightID => $bool) {
+ if($bool == 1) {
+ $rightroles = new Application_Model_RightRoles();
+ $rightroles->setRightID($rightID);
+ $rightroles->setRoleID($roleID);
+ try {
+ $this->rightRolesMapper->save($rightroles);
+ } catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ return;
+ }
+ }
}
$this->_redirect('/user/role/show/roleID/' . $roleID);
return;