diff options
author | Simon | 2011-04-18 12:42:30 +0200 |
---|---|---|
committer | Simon | 2011-04-18 12:42:30 +0200 |
commit | 281a9a40960403b4483af33eec5cebab10e32684 (patch) | |
tree | f9a3f7602315e7d1c55f664d161186a911ce2952 | |
parent | Pbs_Graph bei Minuswerten wird nichts eingefärbt (diff) | |
download | pbs2-281a9a40960403b4483af33eec5cebab10e32684.tar.gz pbs2-281a9a40960403b4483af33eec5cebab10e32684.tar.xz pbs2-281a9a40960403b4483af33eec5cebab10e32684.zip |
Role Controller geändert
-rw-r--r-- | RightRolesBeauty.html | 519 | ||||
-rw-r--r-- | application/modules/user/controllers/PersonController.php | 3 | ||||
-rw-r--r-- | application/modules/user/controllers/RoleController.php | 65 | ||||
-rw-r--r-- | application/modules/user/views/scripts/role/index.phtml | 138 | ||||
-rw-r--r-- | application/modules/user/views/scripts/role/show.phtml | 10 | ||||
-rw-r--r-- | dbContent.png | bin | 0 -> 192702 bytes | |||
-rw-r--r-- | library/Pbs/NewMember.php | 15 | ||||
-rw-r--r-- | pbs.sql | 4 | ||||
-rw-r--r-- | public/media/css/fbgui.css | 3 |
9 files changed, 125 insertions, 632 deletions
diff --git a/RightRolesBeauty.html b/RightRolesBeauty.html deleted file mode 100644 index 944b462..0000000 --- a/RightRolesBeauty.html +++ /dev/null @@ -1,519 +0,0 @@ -<!-- -mysql-query: - SELECT rc.title, r.title, shortcut - FROM pbs_right r, pbs_rightcategory rc - WHERE r.`rightcategoryID` = rc.`rightcategoryID` ---> -<style type="text/css"> -td, th{font-family:verdana, arial, courier;} -tr.odd{background-color:#CCC;} -tr.even{background-color:#FFF;} -</style> -<table class="data" id="table_results"> -<thead><tr> - <th colspan="3"></th> -</tr> -<tr> - <th> -<a>title</a> -</th><th> -<a>title</a> -</th><th> -<a>shortcut</a> -</th></tr> -</thead> - <tbody> - <tr class="odd"> -<td class="">Person</td> -<td class="">Edit own profiledetails</td> -<td class="">peod</td> -</tr> - - <tr class="even"> -<td class="">Person</td> -<td class="">Show own profiledetails</td> -<td class="">psod</td> -</tr> - - <tr class="odd"> -<td class="">Person</td> -<td class="">Delete own account</td> -<td class="">pdo</td> -</tr> - - <tr class="even"> -<td class="">Person</td> -<td class="">Delete account of other</td> -<td class="">pd</td> -</tr> - - <tr class="odd"> -<td class="">Person</td> -<td class="">Show other profiledetails</td> -<td class="">psood</td> -</tr> - - <tr class="even"> -<td class="">Person</td> -<td class="">Edit account from other</td> -<td class="">peoa</td> -</tr> - - <tr class="odd"> -<td class="">Person</td> -<td class="">Suspend account</td> -<td class="">psa</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Show overview of group</td> -<td class="">gso</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Show details of own group</td> -<td class="">gsdo</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Show details of other group</td> -<td class="">gsdog</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Show members of group</td> -<td class="">gsmg</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Create group</td> -<td class="">gc</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Delete group</td> -<td class="">gd</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Delete group with all child groups</td> -<td class="">gdlwc</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Request membership</td> -<td class="">grm</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Accect membership request</td> -<td class="">gam</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Decline membership request</td> -<td class="">gdm</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Delete membership in own group</td> -<td class="">gdmo</td> -</tr> - - <tr class="odd"> -<td class="">Group</td> -<td class="">Delete membership in other group</td> -<td class="">gdmog</td> -</tr> - - <tr class="even"> -<td class="">Group</td> -<td class="">Suspend membership</td> -<td class="">gsm</td> -</tr> - - <tr class="odd"> -<td class="">Role</td> -<td class="">Add role</td> -<td class="">ra</td> -</tr> - - <tr class="even"> -<td class="">Role</td> -<td class="">Display details of role</td> -<td class="">rdd</td> -</tr> - - <tr class="odd"> -<td class="">Role</td> -<td class="">Delete role</td> -<td class="">rd</td> -</tr> - - <tr class="even"> -<td class="">Role</td> -<td class="">Change role of membership</td> -<td class="">rcr</td> -</tr> - - <tr class="odd"> -<td class="">Role</td> -<td class="">Add right to role</td> -<td class="">rar</td> -</tr> - - <tr class="even"> -<td class="">Role</td> -<td class="">Remove right of role</td> -<td class="">rrr</td> -</tr> - - <tr class="odd"> -<td class="">Role</td> -<td class="">Inherit role</td> -<td class="">rir</td> -</tr> - - <tr class="even"> -<td class="">BootMedia</td> -<td class="">Show admin interface of BootMedia</td> -<td class="">bai</td> -</tr> - - <tr class="odd"> -<td class="">BootMedia</td> -<td class="">Show user interface of BootMedia</td> -<td class="">bui</td> -</tr> - - <tr class="even"> -<td class="">BootMedia</td> -<td class="">Create new BootMedia</td> -<td class="">bc</td> -</tr> - - <tr class="odd"> -<td class="">BootMedia</td> -<td class="">Edit BootMedia</td> -<td class="">be</td> -</tr> - - <tr class="even"> -<td class="">BootMedia</td> -<td class="">Delete BootMedia</td> -<td class="">bd</td> -</tr> - - <tr class="odd"> -<td class="">BootMedia</td> -<td class="">Download BootMedia</td> -<td class="">bdld</td> -</tr> - - <tr class="even"> -<td class="">BootMedia</td> -<td class="">Edit metadata (Description, Title) of a BootMedia</td> -<td class="">bem</td> -</tr> - - <tr class="odd"> -<td class="">Preboot</td> -<td class="">Show overview of preboots</td> -<td class="">pro</td> -</tr> - - <tr class="even"> -<td class="">Preboot</td> -<td class="">Create preboot</td> -<td class="">prc</td> -</tr> - - <tr class="odd"> -<td class="">Preboot</td> -<td class="">Edit preboot</td> -<td class="">pre</td> -</tr> - - <tr class="even"> -<td class="">Preboot</td> -<td class="">Delete preboot</td> -<td class="">prd</td> -</tr> - - <tr class="odd"> -<td class="">Preboot</td> -<td class="">Update preboot</td> -<td class="">pru</td> -</tr> - - <tr class="even"> -<td class="">Preboot</td> -<td class="">Edit metadata (Description, Title) of a preboot</td> -<td class="">prem</td> -</tr> - - <tr class="odd"> -<td class="">Config</td> -<td class="">Show admin overview of config</td> -<td class="">csai</td> -</tr> - - <tr class="even"> -<td class="">Config</td> -<td class="">Show user overview of config</td> -<td class="">csui</td> -</tr> - - <tr class="odd"> -<td class="">Config</td> -<td class="">Create config</td> -<td class="">cc</td> -</tr> - - <tr class="even"> -<td class="">Config</td> -<td class="">Edit config</td> -<td class="">ce</td> -</tr> - - <tr class="odd"> -<td class="">Config</td> -<td class="">Delete config</td> -<td class="">cd</td> -</tr> - - <tr class="even"> -<td class="">Config</td> -<td class="">Update config</td> -<td class="">cu</td> -</tr> - - <tr class="odd"> -<td class="">Config</td> -<td class="">Edit metadata (Description, Title) of config</td> -<td class="">cem</td> -</tr> - - <tr class="even"> -<td class="">BootOs</td> -<td class="">Create BootOs</td> -<td class="">boc</td> -</tr> - - <tr class="odd"> -<td class="">BootOs</td> -<td class="">Show admin interface of BootOs</td> -<td class="">boai</td> -</tr> - - <tr class="even"> -<td class="">BootOs</td> -<td class="">Show user interface of BootOs</td> -<td class="">boui</td> -</tr> - - <tr class="odd"> -<td class="">BootOs</td> -<td class="">Edit BootOs</td> -<td class="">boe</td> -</tr> - - <tr class="even"> -<td class="">BootOs</td> -<td class="">Delete BootOs</td> -<td class="">bod</td> -</tr> - - <tr class="odd"> -<td class="">BootOs</td> -<td class="">Update BootOs</td> -<td class="">bou</td> -</tr> - - <tr class="even"> -<td class="">BootOs</td> -<td class="">Edit metadata (Description, Title) of config</td> -<td class="">boem</td> -</tr> - - <tr class="odd"> -<td class="">BootMenu</td> -<td class="">Show admin interface of BootMenu</td> -<td class="">booai</td> -</tr> - - <tr class="even"> -<td class="">BootMenu</td> -<td class="">Show user interface of BootMenu</td> -<td class="">booui</td> -</tr> - - <tr class="odd"> -<td class="">BootMenu</td> -<td class="">Create BootMenu</td> -<td class="">booc</td> -</tr> - - <tr class="even"> -<td class="">BootMenu</td> -<td class="">Delete BootMenu</td> -<td class="">bood</td> -</tr> - - <tr class="odd"> -<td class="">BootMenu</td> -<td class="">Edit BootMenu</td> -<td class="">booe</td> -</tr> - - <tr class="even"> -<td class="">BootMenu</td> -<td class="">Delete entry of BootMenu</td> -<td class="">boode</td> -</tr> - - <tr class="odd"> -<td class="">BootMenu</td> -<td class="">Add entry to a BootMenu</td> -<td class="">booae</td> -</tr> - - <tr class="even"> -<td class="">BootMenu</td> -<td class="">Edit an entry of a BootMenu</td> -<td class="">booee</td> -</tr> - - <tr class="odd"> -<td class="">BootMenu</td> -<td class="">Edit metadata (Description, Title) of an entry of </td> -<td class="">booeem</td> -</tr> - - <tr class="even"> -<td class="">Client</td> -<td class="">Show overview of Clients</td> -<td class="">clo</td> -</tr> - - <tr class="odd"> -<td class="">Client</td> -<td class="">Add new Clients</td> -<td class="">cla</td> -</tr> - - <tr class="even"> -<td class="">Client</td> -<td class="">Edit Clients</td> -<td class="">cle</td> -</tr> - - <tr class="odd"> -<td class="">Client</td> -<td class="">Delete Clients</td> -<td class="">cld</td> -</tr> - - <tr class="even"> -<td class="">Pool</td> -<td class="">Show overview of Pool</td> -<td class="">poo</td> -</tr> - - <tr class="odd"> -<td class="">Pool</td> -<td class="">Create new Pool</td> -<td class="">poc</td> -</tr> - - <tr class="even"> -<td class="">Pool</td> -<td class="">Edit Pool</td> -<td class="">poe</td> -</tr> - - <tr class="odd"> -<td class="">Pool</td> -<td class="">Delete Pool</td> -<td class="">pod</td> -</tr> - - <tr class="even"> -<td class="">Pool</td> -<td class="">Unlink client to pool</td> -<td class="">pouc</td> -</tr> - - <tr class="odd"> -<td class="">Pool</td> -<td class="">Link client to pool</td> -<td class="">polc</td> -</tr> - - <tr class="even"> -<td class="">Pool</td> -<td class="">Show unlinked Clients</td> -<td class="">posuc</td> -</tr> - - <tr class="odd"> -<td class="">Filter</td> -<td class="">Show overview of Pool</td> -<td class="">fo</td> -</tr> - - <tr class="even"> -<td class="">Filter</td> -<td class="">Create new Filter</td> -<td class="">fa</td> -</tr> - - <tr class="odd"> -<td class="">Filter</td> -<td class="">Edit Filter</td> -<td class="">fe</td> -</tr> - - <tr class="even"> -<td class="">Filter</td> -<td class="">Edit Filterpriority</td> -<td class="">fefp</td> -</tr> - - <tr class="odd"> -<td class="">Filter</td> -<td class="">Delete Filter</td> -<td class="">fd</td> -</tr> - - <tr class="even"> -<td class="">Filter</td> -<td class="">Add additional Filterentry to a Filter</td> -<td class="">ffa</td> -</tr> - - <tr class="odd"> -<td class="">Filter</td> -<td class="">Edit Filterentry of a Filter</td> -<td class="">ffe</td> -</tr> - - <tr class="even"> -<td class="">Filter</td> -<td class="">Delete Filterentry of a Filter</td> -<td class="">ffd</td> -</tr> - -</tbody> -</table> diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index 4f6b975..d70067a 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -411,6 +411,9 @@ class user_PersonController extends Zend_Controller_Action public function deleterequestAction() { + if(!Pbs_Acl::checkRight('gdm')) { + $this->_redirect('/user'); + } $grouprequestID = $this->_request->getParam('grouprequestID'); $grouprequest = $this->groupRequestMapper->find($grouprequestID); try { diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 2c22031..8d2b044 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -3,6 +3,8 @@ class User_RoleController extends Zend_Controller_Action { protected $userIDsNamespace = null; + protected $membership; + protected $membershipMapper; public function init() { @@ -15,9 +17,17 @@ class User_RoleController extends Zend_Controller_Action $this->roleMapper = new Application_Model_RoleMapper(); $this->rightMapper = new Application_Model_RightMapper(); $this->rightRolesMapper = new Application_Model_RightRolesMapper(); + $this->membershipMapper = new Application_Model_MembershipMapper(); + + $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + $this->membership = new Application_Model_Membership(); + $this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership); } else { $this->_helper->redirector('login', 'auth'); } + if($this->membership->getGroupID() == ''){ + $this->_helper->redirector('selectmembership', 'person'); + } } public function indexAction() @@ -25,9 +35,33 @@ class User_RoleController extends Zend_Controller_Action if(!Pbs_Acl::checkRight('ro')) { $this->_redirect('/user'); } - if(isset($this->userIDsNamespace['groupID'])) { - $this->view->roleList = $this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true); - + $this->view->membership = $this->membership; + $groupID = $this->membership->getGroupID(); + $this->view->roleList = $this->roleMapper->findBy(array('groupID' => $groupID),true); + + $roles = array(); + $groupGroupsMapper = new Application_Model_GroupGroupsMapper(); + $parents = $groupGroupsMapper->getParentGroups($groupID); + $groupMapper = new Application_Model_GroupMapper(); + $roleMapper = new Application_Model_RoleMapper(); + $crawled = array(); + foreach($parents as $p){ + foreach($p as $a){ + if(!in_array($a,$crawled)){ + $crawled[] = $a; + $group = $groupMapper->find($a); + if($groupID != $a) + $r = $roleMapper->findBy(array('groupID' => $a,'inheritance'=>"1")); + else + $r = $roleMapper->findBy(array('groupID' => $a)); + foreach($r as $d){ + $roles[$group->getTitle()][] = $d; + } + } + } + } + $this->view->roleList = $roles; + // Search $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); @@ -54,10 +88,7 @@ class User_RoleController extends Zend_Controller_Action $this->view->deleteRight = Pbs_Acl::checkRight('rd'); $this->view->detailsRight = Pbs_Acl::checkRight('rdd'); $this->view->userIDsNamespace = $this->userIDsNamespace; - } else { - $this->_helper->redirector('selectmembership', 'person'); - return; - } + } public function searchAction(){ @@ -72,7 +103,7 @@ class User_RoleController extends Zend_Controller_Action if(!Pbs_Acl::checkRight('ra')) { $this->_redirect('/user'); } - if(isset($this->userIDsNamespace['groupID'])) { + $roleID = $this->userIDsNamespace['roleID']; $rights = $this->rightMapper->fetchAll(); if(count($rights) > 0) { @@ -119,10 +150,6 @@ class User_RoleController extends Zend_Controller_Action } } $this->view->addForm = $addForm; - } else { - $this->_helper->redirector('selectmembership', 'person'); - return; - } } public function editAction() @@ -194,7 +221,7 @@ class User_RoleController extends Zend_Controller_Action $roleMapper = new Application_Model_RoleMapper(); $role = $roleMapper->find($roleID); $roleGroupID = $role->getGroupID(); - if($this->userIDsNamespace['groupID'] == $roleGroupID) { + if($this->userIDsNamespace['groupID'] == $roleGroupID || $role->getInheritance() == 1) { $rightroles = $this->rightRolesMapper->findBy(array('roleID' => $roleID),true); if(count($rightroles) > 0) { foreach($rightroles as $rightrole) { @@ -434,15 +461,3 @@ class User_RoleController extends Zend_Controller_Action } - - - - - - - - - - - - diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml index edf03eb..580238f 100644 --- a/application/modules/user/views/scripts/role/index.phtml +++ b/application/modules/user/views/scripts/role/index.phtml @@ -1,6 +1,4 @@ -<?php -if($this->userIDsNamespace['groupID']) { - ?> + <h1>Roles</h1> <?php echo $this->searchform; @@ -9,82 +7,74 @@ if($this->userIDsNamespace['groupID']) { 'class' => 'addbutton')); ?> <div class='searchvars'> -<div class='head'>Available searchfilter:</div> -<div class='code'>title</div> -<div class='code'>description</div> + <div class='head'>Available searchfilter:</div> + <div class='code'>title</div> + <div class='code'>description</div> </div> -<div class='listelement'><?php -if(count($this->roleList)==0) -echo "There are no roles" ?> <?php foreach($this->roleList as $k => $role): ?> -<?php -$class=''; -if($role['roleID'] == $this->userIDsNamespace['roleID']) -$class= 'highlight checked'; -?> - <div class='element<?php echo " $class";?>'> - <?php if($role['roleID'] != $this->userIDsNamespace['roleID']) { ?> - <div class='number'> - <div class='smallnumber'>Role</div> - <?php echo $role['roleID']; ?> - </div> +<div class='listelement'> +<?php if(count($this->roleList)==0) + echo "There are no roles" ?> +<?php foreach($this->roleList as $i => $grouproleList): ?> + <?php foreach($grouproleList as $k => $role): ?> <?php - } - ?> - <div class='content'> - <div class='actions'><?php if($this->detailsRight) {?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'show', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a> <?php - } - if($this->editRight) { ?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'edit', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a> <?php - } -if($this->deleteRight) { ?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'delete', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> - -<?php } ?> -</div> -<div class='title'><?php echo $role['title'] ?></div> - <?php if($role['description']) { - ?> -<div class='subtitle'><?php echo $role['description']; ?></div> - <?php - } else { - ?> -<div class='subtitle'> </div> - <?php - } + $class=''; + if($role->getID() == $this->membership->getRoleID()) + $class= 'highlight checked'; + ?> + <div class='element<?php echo " $class";?>'> + <?php if($role->getID() != $this->userIDsNamespace['roleID']) { ?> + <div class='number'> + <div class='smallnumber'>Role</div> + <?php echo $role->getID(); ?> + </div> + <?php + } + ?> + <div class='content'> + <div class='actions'><?php if($this->detailsRight) {?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'show', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a> <?php + } + if($this->editRight && $this->membership->getGroupID() == $role->getGroupID()) { ?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'edit', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a> <?php + } + if($this->deleteRight && $this->membership->getGroupID() == $role->getGroupID()) { ?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'delete', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> -?></div> -<div class='clear'></div> + <?php } ?> + </div> + <div class='title'><?php echo "[".$i."] ";?><?php echo $role->getTitle();?></div> + <div class='subtitle'><?php echo $role->getDescription(); ?> </div></div> + <div class='clear'></div> + </div> + <?php endforeach ?> +<?php endforeach ?> </div> -<?php endforeach ?></div> -<?php echo $this->pagination; -} -?> +<?php echo $this->pagination; ?> <br /> <br /> diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml index 43ae781..765153f 100644 --- a/application/modules/user/views/scripts/role/show.phtml +++ b/application/modules/user/views/scripts/role/show.phtml @@ -9,10 +9,10 @@ if($this->roleID) { <h1>Role Details</h1> <?php } - if($this->deleteRight) echo $this->formButton('deleterole', 'Delete', array( + if($this->deleteRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('deleterole', 'Delete', array( 'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"', 'class' => 'rightbutton')); - if($this->editRight) echo $this->formButton('editrole', 'Edit', array( + if($this->editRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('editrole', 'Edit', array( 'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"', 'class' => 'rightbutton')); ?> @@ -38,7 +38,7 @@ if($this->roleID) { <h2>Rights:</h2> <?php if($this->rightsAvailable === true) { - if($this->addRightToRoleRight) { + if($this->addRightToRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) { echo $this->formButton('linkright', 'Add Rights', array( 'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"', 'class' => 'addbutton'))?> @@ -48,7 +48,7 @@ if($this->rightsAvailable === true) { if(count($this->rightsList)==0) { echo "There are no Rights to display."; } else { - if($this->removeRightOfRoleRight) echo $this->formButton('deleteallrights', 'Delete All Rights', array( + if($this->removeRightOfRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('deleteallrights', 'Delete All Rights', array( 'onclick' => 'self.location="/user/role/unlinkright/rightrolesID/' . $this->roleID . '-all"', 'class' => 'rightbutton'));?> <br /> @@ -63,7 +63,7 @@ if(count($this->rightsList)==0) { foreach($rights as $right): ?> <div class='element'> -<div class='content'><?php if($this->removeRightOfRoleRight) { +<div class='content'><?php if($this->removeRightOfRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) { ?> <div class='actions'><a href="<?php echo $this->url( diff --git a/dbContent.png b/dbContent.png Binary files differnew file mode 100644 index 0000000..86c297a --- /dev/null +++ b/dbContent.png diff --git a/library/Pbs/NewMember.php b/library/Pbs/NewMember.php index 62069c2..2865ef9 100644 --- a/library/Pbs/NewMember.php +++ b/library/Pbs/NewMember.php @@ -28,13 +28,14 @@ class Pbs_NewMember{ $userBootmenu->setID($userBootmenuID); # print_a('userbootmenu',$userBootmenu); - - $bootmenuentries = $bootmenuentriesMapper->findBy(array('bootmenuID'=>$defaultBootmenu->getID())); - foreach($bootmenuentries as $bme){ - $bme->setID(null); - $bme->setBootmenuID($userBootmenuID); - $bootmenuentriesMapper->save($bme); - #print_a('bootmenuentry',$bme); + if($defaultBootmenu->getID() != ''){ + $bootmenuentries = $bootmenuentriesMapper->findBy(array('bootmenuID'=>$defaultBootmenu->getID())); + foreach($bootmenuentries as $bme){ + $bme->setID(null); + $bme->setBootmenuID($userBootmenuID); + $bootmenuentriesMapper->save($bme); + #print_a('bootmenuentry',$bme); + } } // Second we create a filter @@ -370,7 +370,7 @@ INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title` -- Eigene Personendetails ändern (NULL, '1', 'peod', 'Edit own profiledetails', NULL), -- Eigene Personendetails anzeigen -(NULL, '1', 'psod', 'Show own profiledetails', NULL), +(NULL, '1', 'psod', 'XXX - Show own profiledetails', NULL), -- Eigene Identität vom System löschen (NULL, '1', 'pdo', 'Delete own account', NULL), -- Person löschen @@ -399,7 +399,7 @@ INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title` -- Gruppe mit allen Untergruppen löschen (NULL, '2', 'gdlwc', 'Delete group with all child groups', NULL), -- Gruppenanfragen stellen -(NULL, '2', 'grm', 'XX - Request membership', NULL), +(NULL, '2', 'grm', 'XXX - Request membership', NULL), -- Gruppenanfragen akzeptieren (NULL, '2', 'gam', 'Accept membership request', NULL), -- Gruppenanfragen ablehnen diff --git a/public/media/css/fbgui.css b/public/media/css/fbgui.css index f7e55cb..8fdbc12 100644 --- a/public/media/css/fbgui.css +++ b/public/media/css/fbgui.css @@ -90,3 +90,6 @@ div.menu>img { margin-bottom:5px; margin-top:20px; } +.selectswitch{ + cursor:default !important; +} |