summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/PrebootController.php
diff options
context:
space:
mode:
authormichael pereira2011-03-30 02:21:26 +0200
committermichael pereira2011-03-30 02:21:26 +0200
commit6bcafce824f5b6b97af726eb620397f214438a00 (patch)
tree5620bdbb4bc2729ab2e3fcaaee1db30c294da514 /application/modules/user/controllers/PrebootController.php
parentPaar Notifier hinzugefĆ¼gt (diff)
downloadpbs2-6bcafce824f5b6b97af726eb620397f214438a00.tar.gz
pbs2-6bcafce824f5b6b97af726eb620397f214438a00.tar.xz
pbs2-6bcafce824f5b6b97af726eb620397f214438a00.zip
Preboot Metadaten Recht gesetzt
Diffstat (limited to 'application/modules/user/controllers/PrebootController.php')
-rw-r--r--application/modules/user/controllers/PrebootController.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php
index 1491ae9..716b9fa 100644
--- a/application/modules/user/controllers/PrebootController.php
+++ b/application/modules/user/controllers/PrebootController.php
@@ -120,7 +120,7 @@ class User_PrebootController extends Zend_Controller_Action
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
$this->_redirect('/user/preboot/index/addresult/error');
- //TODO Delete folder + preboot
+ //TODO Delete folder + preboot in DB
}
$this->_redirect('/user/preboot/index/addresult/ok');
@@ -241,16 +241,12 @@ class User_PrebootController extends Zend_Controller_Action
if($this->membership->getGroupID() != $preboot->getGroupID())
$this->_redirect('/user/preboot/index/modifyresult/forbidden');
- $prebootForm = new user_Form_Preboot(array('action' => 'editpreboot'));
+ $prebootForm = new user_Form_Preboot(array('action' => 'editpreboot', 'rights' => 'meta'));
$prebootForm->populate($preboot->toArray());
}else{
- //TODO ACL Is he allowed to edit Preboots?
- if(false)
- $this->_redirect('/user/preboot/index/modifyresult/forbidden');
-
- $prebootForm = new user_Form_Preboot(array('action' => 'editpreboot'),$_POST);
+ $prebootForm = new user_Form_Preboot(array('action' => 'editpreboot', 'rights' => 'meta'),$_POST);
if ($prebootForm->isValid($_POST)) {
@@ -260,13 +256,7 @@ class User_PrebootController extends Zend_Controller_Action
$preboot = new Application_Model_PreBoot($_POST);
$preboot->setMembershipID($this->membership->getID());
$preboot->setGroupID($this->membership->getGroupID());
-
- if($this->membership->getGroupID() != $preboot->getGroupID())
- $this->_redirect('/user/preboot/index/modifyresult/forbidden');
-
- $preboot->setMembershipID($this->membership->getID());
- $preboot->setGroupID($this->membership->getGroupID());
- $preboot->setID($prebootID);
+ $preboot->setID($prebootID);
$path_preboot = "../resources/bootmedium/$prebootID/";
@@ -353,6 +343,7 @@ class User_PrebootController extends Zend_Controller_Action
$this->prebootMapper->delete($preboot);
exec("rm -r ../resources/bootmedium/".$prebootID);
+
}catch(Zend_Exception $e){
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";