diff options
author | michael pereira | 2011-04-05 15:35:32 +0200 |
---|---|---|
committer | michael pereira | 2011-04-05 15:35:32 +0200 |
commit | 198221618856ef22ab8f69874b8d4e101db3746d (patch) | |
tree | 85ece381624332620219983e037bac94776d5d52 /application/modules/user/controllers/BootosController.php | |
parent | find Methode angepasst (diff) | |
download | pbs2-198221618856ef22ab8f69874b8d4e101db3746d.tar.gz pbs2-198221618856ef22ab8f69874b8d4e101db3746d.tar.xz pbs2-198221618856ef22ab8f69874b8d4e101db3746d.zip |
Rechte in Controller eingepflanzt
Diffstat (limited to 'application/modules/user/controllers/BootosController.php')
-rw-r--r-- | application/modules/user/controllers/BootosController.php | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index 8f602fe..34fddd0 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -57,8 +57,8 @@ class user_BootosController extends Zend_Controller_Action $groupID = $this->membership->getGroupID(); - //TODO ACL Darf er BootOsMenu sehen? - if(false) + //ACL Darf er BootOs sehen? + if(!Pbs_Acl::checkRight('boai') && !Pbs_Acl::checkRight('boui')) $this->_redirect('/user/index'); $configMapper = new Application_Model_ConfigMapper(); @@ -96,8 +96,8 @@ class user_BootosController extends Zend_Controller_Action public function createbootosAction() { - //TODO ACL Darf er BootISOs erstellen? - if(false) + //ACL Darf er BootISOs erstellen? + if(!Pbs_Acl::checkRight('boc')) $this->_redirect('/user/bootos/index/page/'.$this->page.'/addresult/forbidden'); $groupID = $this->membership->getGroupID(); @@ -105,7 +105,6 @@ class user_BootosController extends Zend_Controller_Action $groupgroupsMapper = new Application_Model_GroupGroupsMapper(); $childgroups = count($groupgroupsMapper->getChildGroups($groupID)); - //TODO nur configs von admins $configMapper = new Application_Model_ConfigMapper(); $configlist = $configMapper->findBy(array("groupID" => $groupID)); @@ -114,7 +113,6 @@ class user_BootosController extends Zend_Controller_Action 'action' => 'createbootos', 'groupdepth' => $childgroups, 'configlist'=>$configlist, - 'rights' => 'all', 'page' => $this->page)); } else { @@ -122,14 +120,12 @@ class user_BootosController extends Zend_Controller_Action 'action' => 'createbootos', 'groupdepth' => $childgroups, 'configlist'=>$configlist, - 'rights' => 'all', 'page' => $this->page),$_POST); if ($bootosForm->isValid($_POST)) { $bootos = new Application_Model_BootOs($_POST); - $bootos->setMembershipID($this->membership->getID()); $bootos->setGroupID($this->membership->getGroupID()); $bootos->setCreated(time()); @@ -180,8 +176,8 @@ class user_BootosController extends Zend_Controller_Action public function checkupdateAction($bootos) { - //TODO ACL Is he allowed to update Preboots? - if(false) + //ACL Is he allowed to update Preboots? + if(!Pbs_Acl::checkRight('bou')) $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden'); $bootosID = $bootos->getID(); @@ -217,8 +213,8 @@ class user_BootosController extends Zend_Controller_Action public function updatebootosAction() { - //TODO ACL Is he allowed to update Preboots? - if(false) + //ACL Is he allowed to update Preboots? + if(!Pbs_Acl::checkRight('bou')) $this->_redirect('/user/bootiso/index/page/'.$this->page.'/updateresult/forbidden'); $bootosID = $this->_request->getParam('bootosID'); @@ -252,8 +248,8 @@ class user_BootosController extends Zend_Controller_Action public function editbootosAction() { - //TODO ACL Is he allowed to edit Preboots? - if(false) + //ACL Is he allowed to edit Preboots? + if(!Pbs_Acl::checkRight('boe')) $this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden'); $bootosID = $this->_request->getParam('bootosID'); @@ -280,7 +276,6 @@ class user_BootosController extends Zend_Controller_Action 'action' => 'editbootos', 'groupdepth' => $childgroups, 'configlist'=>$configlist, - 'rights' => 'meta', 'page' => $this->page)); $bootosForm->populate($bootos->toArray()); @@ -290,7 +285,6 @@ class user_BootosController extends Zend_Controller_Action 'action' => 'editbootos', 'groupdepth' => $childgroups, 'configlist'=>$configlist, - 'rights' => 'meta', 'page' => $this->page),$_POST); if ($bootosForm->isValid($_POST)) { @@ -298,7 +292,6 @@ class user_BootosController extends Zend_Controller_Action $bootosold = $bootos; $bootos = new Application_Model_BootOs($_POST); - $bootos->setMembershipID($this->membership->getID()); $bootos->setGroupID($this->membership->getGroupID()); $bootos->setCreated(time()); if($bootos->getConfigID() == '') @@ -309,14 +302,14 @@ class user_BootosController extends Zend_Controller_Action $bootos->getDefaultkcl() != $bootosold->getDefaultkcl() || $bootos->getExpires() != $bootosold->getExpires() || $bootos->getPublic() != $bootosold->getPublic() ){ - //TODO ACL Is he allowed to edit this? - if(false) + //ACL Is he allowed to edit this? + if(Pbs_Acl::checkRight('boem')) $this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden'); } if($bootos->getPath_kernel() != $bootosold->getPath_kernel() || $bootos->getPath_init() != $bootosold->getPath_init()){ - //TODO ACL Is he allowed to edit the Kernel/Init Path? - if(false) + //ACL Is he allowed to edit the Kernel/Init Path? + if(Pbs_Acl::checkRight('boem')) $this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden'); $path_tmp = "../resources/bootos/"; @@ -366,8 +359,8 @@ class user_BootosController extends Zend_Controller_Action public function deletebootosAction() { - //TODO ACL Is he allowed to delete Bootos? - if(false) + //ACL Is he allowed to delete Bootos? + if(!Pbs_Acl::checkRight('bod')) $this->_redirect('/user/bootos/index/page/'.$this->page.'/deleteresult/forbidden'); try{ |