summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/RoleController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-29 16:26:39 +0200
committerBjörn Geiger2011-03-29 16:26:39 +0200
commit6521222deb21df89ba62fe5b92d25fcf8fc643bb (patch)
tree00dd2708e0ce2de8337d9a0d7090d4d3c9190b92 /application/modules/user/controllers/RoleController.php
parentaktive Rolle wird angezeigt (diff)
downloadpbs2-6521222deb21df89ba62fe5b92d25fcf8fc643bb.tar.gz
pbs2-6521222deb21df89ba62fe5b92d25fcf8fc643bb.tar.xz
pbs2-6521222deb21df89ba62fe5b92d25fcf8fc643bb.zip
RightCategories auch auf der Role Detail Seite
Diffstat (limited to 'application/modules/user/controllers/RoleController.php')
-rw-r--r--application/modules/user/controllers/RoleController.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 3db425f..3d8e0de 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -131,12 +131,20 @@ class User_RoleController extends Zend_Controller_Action
if(count($rightroles) > 0) {
foreach($rightroles as $rightrole) {
$right = $this->rightMapper->find($rightrole['rightID']);
- $rightsList[] = $right;
+ $rightsList[$right->getRightcategoryID()][] = $right;
}
if(is_array($rightsList)) {
$this->view->rightsList = $rightsList;
}
}
+ $rightCategoryMapper = new Application_Model_RightCategoryMapper();
+ $rightCategories = $rightCategoryMapper->fetchAll();
+ if(count($rightCategories) > 0) {
+ foreach($rightCategories as $rightCategory) {
+ $rightcategorieslist[$rightCategory->getID()] = $rightCategory->getTitle();
+ }
+ $this->view->rightcategorieslist = $rightcategorieslist;
+ }
$this->view->role = $this->roleMapper->find($roleID);
$this->view->roleID = $roleID;
$this->view->userIDsNamespace = $this->userIDsNamespace;
@@ -214,8 +222,7 @@ class User_RoleController extends Zend_Controller_Action
}
}
if(!$found) {
- $rightCategory = $right->getRightcategoryID();
- $rightlist[$rightCategory][] = $right;
+ $rightlist[$right->getRightcategoryID()][] = $right;
}
$found = false;
}