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/BootmenuController.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/BootmenuController.php')
| -rw-r--r-- | application/modules/user/controllers/BootmenuController.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index 7843b3f..b18adbe 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -57,8 +57,8 @@ class user_BootmenuController extends Zend_Controller_Action } - //TODO ACL Darf er Bootmenus sehen? - if(false) + //ACL Darf er Bootmenus sehen? + if(!Pbs_Acl::checkRight('booai') && !Pbs_Acl::checkRight('booui')) $this->_redirect('/user/index'); $this->bootMenumapper = new Application_Model_BootMenuMapper(); @@ -66,8 +66,7 @@ class user_BootmenuController extends Zend_Controller_Action $bootosMapper = new Application_Model_BootOsMapper(); $configMapper = new Application_Model_ConfigMapper(); - if(true){ - //TODO nur Bootmenus von Admins + if(Pbs_Acl::checkRight('booai')){ $bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID())); foreach ($bootmenu as $bm){ $bootmenuID = $bm->getID(); @@ -107,22 +106,23 @@ class user_BootmenuController extends Zend_Controller_Action public function createbootmenuAction() { - //TODO ACL Darf er BootMenus erstellen? - if(false) + //ACL Darf er BootMenus erstellen? + if(!Pbs_Acl::checkRight('booc')) $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/forbidden'); if (!isset($_POST["createbootmenu"])){ - $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu', 'rights' => 'all','page' => $this->page)); + $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page)); } else { - $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu', 'rights' => 'all','page' => $this->page),$_POST); + $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page),$_POST); if ($bootmenuForm->isValid($_POST)) { $bootmenu = new Application_Model_BootMenu($_POST); + $bootmenu->setCreated(time()); + $bootmenu->setMembershipID($this->membership->getID()); $bootmenu->setGroupID($this->membership->getGroupID()); - $bootmenu->setCreated(time()); try{ $this->bootmenuMapper->save($bootmenu); |
