summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/BootisoController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/BootisoController.php')
-rw-r--r--application/modules/user/controllers/BootisoController.php37
1 files changed, 15 insertions, 22 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index 877cb65..654e7eb 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -58,8 +58,8 @@ class user_BootisoController extends Zend_Controller_Action
$groupID = $this->membership->getGroupID();
- //TODO ACL Darf er BootISOMenu sehen?
- if(false)
+ //ACL Darf er BootISOMenu sehen?
+ if(!Pbs_Acl::checkRight('bai') && !Pbs_Acl::checkRight('bui'))
$this->_redirect('/user/index');
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
@@ -84,11 +84,11 @@ class user_BootisoController extends Zend_Controller_Action
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('bootiso');
- $this->view->searchform = $mySearch->searchForm();
if($search != ''){
$this->view->search = $mySearch->getSearchTerm();
$this->view->bootisolist = $mySearch->search($this->view->bootisolist);
}
+ $this->view->searchform = $mySearch->searchForm();
// Pagination
$pagination = new Pbs_Pagination();
@@ -101,9 +101,8 @@ class user_BootisoController extends Zend_Controller_Action
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
$this->view->bootisolist= $this->view->bootisolist;
-
-
-
+
+
$prebootMapper = new Application_Model_PreBootMapper();
$this->view->prebootlist = array();
@@ -126,8 +125,8 @@ class user_BootisoController extends Zend_Controller_Action
- //TODO ACL Darf er BootISOs downloaden?
- if(false)
+ //ACL Darf er BootISOs downloaden?
+ if(!Pbs_Acl::checkRight('bdld'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
$prebootID = $this->_request->getParam('prebootID');
@@ -159,8 +158,8 @@ class user_BootisoController extends Zend_Controller_Action
public function createbootisoAction()
{
- //TODO ACL Darf er BootISOs erstellen?
- if(false)
+ //ACL Darf er BootISOs erstellen?
+ if(!Pbs_Acl::checkRight('bc'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/forbidden');
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
@@ -176,7 +175,6 @@ class user_BootisoController extends Zend_Controller_Action
'action' => 'createbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
- 'rights' => null,
'page'=>$this->page));
} else {
@@ -184,14 +182,12 @@ class user_BootisoController extends Zend_Controller_Action
'action' => 'createbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
- 'rights' => null,
'page'=>$this->page),$_POST);
if ($bootisoForm->isValid($_POST)) {
$bootiso = new Application_Model_BootIso($_POST);
- $bootiso->setMembershipID($this->membership->getID());
$bootiso->setGroupID($this->membership->getGroupID());
$bootiso->setCreated(time());
@@ -227,8 +223,8 @@ class user_BootisoController extends Zend_Controller_Action
public function editbootisoAction()
{
- //TODO ACL Darf er BootISOs editieren?
- if(false)
+ //ACL Darf er BootISOs editieren?
+ if(!Pbs_Acl::checkRight('be'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
$bootisoID = $this->_request->getParam('bootisoID');
@@ -255,7 +251,6 @@ class user_BootisoController extends Zend_Controller_Action
'action' => 'editbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
- 'rights' => 'meta',
'page' => $this->page));
$bootisoForm->populate($bootiso->toArray());
@@ -264,7 +259,6 @@ class user_BootisoController extends Zend_Controller_Action
'action' => 'editbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
- 'rights' => 'meta',
'page' => $this->page),$_POST);
if ($bootisoForm->isValid($_POST)) {
@@ -272,7 +266,6 @@ class user_BootisoController extends Zend_Controller_Action
$bootisoold = $bootiso;
$bootiso = new Application_Model_BootIso($_POST);
- $bootiso->setMembershipID($this->membership->getID());
$bootiso->setGroupID($this->membership->getGroupID());
$bootiso->setCreated(time());
$bootiso->setID($bootisoID);
@@ -282,8 +275,8 @@ class user_BootisoController extends Zend_Controller_Action
$bootiso->getExpires() != $bootisoold->getExpires() ||
$bootiso->getPublic() != $bootisoold->getPublic() ||
$bootiso->getSerialnumber() != $bootisoold->getSerialnumber()){
- //TODO ACL Is he allowed to edit other than Metadata?
- if(false)
+ //ACL Is he allowed to edit other than Metadata?
+ if(Pbs_Acl::checkRight('bem'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
}
@@ -317,8 +310,8 @@ class user_BootisoController extends Zend_Controller_Action
public function deletebootisoAction()
{
- //TODO ACL Darf er BootISOs löschen?
- if(false)
+ //ACL Darf er BootISOs löschen?
+ if(!Pbs_Acl::checkRight('bd'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
try{