diff options
| author | michael pereira | 2011-04-11 14:29:29 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-11 14:29:29 +0200 |
| commit | 4d63a9525b3601dbd2e24328c1ef250ad605765d (patch) | |
| tree | 02179f65307191d7ae3997c38a5276ced038b134 /application/modules/user/controllers | |
| parent | kcl fix im ressource controller (diff) | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.tar.gz pbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.tar.xz pbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/controllers')
4 files changed, 20 insertions, 11 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index a7bfb56..e60679a 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -8,6 +8,7 @@ class user_BootmenuController extends Zend_Controller_Action protected $membershipMapper; protected $membership; protected $page; + protected $type; public function init() { @@ -109,7 +110,8 @@ class user_BootmenuController extends Zend_Controller_Action // Search $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); - $mySearch->setSearchTerm($search); + $mySearch->setSearchTerm($search); + $mySearch->setType($this->type); $mySearch->setModule('bootmenu'); if($search != ''){ $this->view->search = $mySearch->getSearchTerm(); @@ -255,7 +257,7 @@ class user_BootmenuController extends Zend_Controller_Action { //ACL Is he allowed to set Bootmenu as Default? - if(!Pbs_Acl::checkRight('booai')) + if(!Pbs_Acl::checkRight('boodbm')) $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden'); try{ @@ -444,7 +446,7 @@ class user_BootmenuController extends Zend_Controller_Action if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booeeo')) $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden'); }else{ - if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('booee')) + if($this->membership->getGroupID() != $bootmenu->getGroupID() || (!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem'))) $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden'); } diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php index 6f5497a..a38af00 100644 --- a/application/modules/user/controllers/ConfigController.php +++ b/application/modules/user/controllers/ConfigController.php @@ -74,6 +74,7 @@ class user_ConfigController extends Zend_Controller_Action $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); $mySearch->setSearchTerm($search); + $mySearch->setType($this->type); $mySearch->setModule('config'); if($search != ''){ $this->view->search = $mySearch->getSearchTerm(); diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index a17c571..a853a75 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -261,7 +261,12 @@ class User_GroupController extends Zend_Controller_Action $membership->setPersonID($groupRequest->getPersonID()); $membership->setRoleID($_POST['roleID']); try { - $this->membershipMapper->save($membership); + $id = $this->membershipMapper->save($membership); + + $membership->setID($id); + + $newMember = new Pbs_NewMember(); + $newMember->createDefaults($membership); } catch(Zend_Exception $e) { echo "Caught exception: " . get_class($e) . "<br/>"; diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index 9cdf258..ad8f596 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -46,9 +46,9 @@ class user_PersonController extends Zend_Controller_Action public function indexAction() { - if(!Pbs_Acl::checkRight('psod')) { - $this->_redirect('/user'); - } + #if(!Pbs_Acl::checkRight('psod')) { + # $this->_redirect('/user'); + #} $this->view->person = $this->person; // Pagination $pagination = new Pbs_Pagination(); @@ -60,7 +60,8 @@ class user_PersonController extends Zend_Controller_Action $this->view->groups = $pagination->getElements(); $this->view->pagination = $pagination->pagination($pageurl); $this->view->page = $pagination->getRequestPage(); - $this->view->groupRequestRight = Pbs_Acl::checkRight('grm'); + // This should be activated in case the person has no membership and no rights. + $this->view->groupRequestRight = true; $this->view->editRight = Pbs_Acl::checkRight('peoa'); $this->view->leaveRight = Pbs_Acl::checkRight('gl'); $this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); @@ -129,9 +130,9 @@ class user_PersonController extends Zend_Controller_Action public function requestAction() { - if(!Pbs_Acl::checkRight('grm')) { - $this->_redirect('/user'); - } + #if(!Pbs_Acl::checkRight('grm')) { + # $this->_redirect('/user'); + #} $this->view->person = $this->person; $allgroups = $this->groupMapper->fetchAll(); $groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()),true); |
