summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authormichael pereira2011-04-05 19:33:19 +0200
committermichael pereira2011-04-05 19:33:19 +0200
commit3a6c9972b59b11dc98b76ee51446d5568ef0f519 (patch)
treeb0b93ab6630b09c12a94e7e97fb5bd7783754fca /application/modules
parentDates angepasst (diff)
downloadpbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.tar.gz
pbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.tar.xz
pbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.zip
Forms Rechte angepasst, Views angepasst
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/user/controllers/BootisoController.php12
-rw-r--r--application/modules/user/controllers/PrebootController.php2
-rw-r--r--application/modules/user/forms/Bootiso.php6
-rw-r--r--application/modules/user/forms/Bootmenu.php6
-rw-r--r--application/modules/user/forms/BootmenuEntries.php6
-rw-r--r--application/modules/user/forms/Bootos.php6
-rw-r--r--application/modules/user/forms/Config.php6
-rw-r--r--application/modules/user/forms/Preboot.php6
-rw-r--r--application/modules/user/views/scripts/bootiso/index.phtml9
-rw-r--r--application/modules/user/views/scripts/bootmenu/index.phtml8
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml4
-rw-r--r--application/modules/user/views/scripts/config/index.phtml9
-rw-r--r--application/modules/user/views/scripts/preboot/index.phtml6
13 files changed, 29 insertions, 57 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index 2c9c584..5f1a3a2 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -105,7 +105,7 @@ class user_BootisoController extends Zend_Controller_Action
$this->view->prebootlist = array();
foreach ($this->view->bootisolist as $bootiso){
- $this->view->prebootlist[$bootiso->getID()] = $prebootMapper->find($bootiso->getPrebootID())->getTitle();
+ $bootiso->setPrebootID("[".$bootiso->getPrebootID()."] ".$prebootMapper->find($bootiso->getPrebootID())->getTitle());
$bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle());
$bootiso->setCreated(date(Zend_Registry::get('dateformat'),$bootiso->getCreated()));
$bootiso->setExpires(date(Zend_Registry::get('dateformat'),$bootiso->getExpires()));
@@ -128,15 +128,17 @@ class user_BootisoController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('bdld'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
- $prebootID = $this->_request->getParam('prebootID');
$bootisoID = $this->_request->getParam('bootisoID');
+
+ if(!is_numeric($bootisoID))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
+ $prebootID = $this->bootisoMapper->find($bootisoID)->getPrebootID();
+
+
if(!is_dir("../resources/bootmedium/$prebootID/"))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/404');
- if(!is_numeric($prebootID) || !is_numeric($bootisoID))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
-
chdir("../resources/bootmedium/$prebootID/");
header("X-Sendfile: $bootisoID".".zip");
diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php
index 8bf6c47..5e09721 100644
--- a/application/modules/user/controllers/PrebootController.php
+++ b/application/modules/user/controllers/PrebootController.php
@@ -92,8 +92,6 @@ class User_PrebootController extends Zend_Controller_Action
foreach ($this->view->prebootlist as $preboot){
$this->view->update[$preboot->getID()] = $update && $this->checkupdateAction($preboot);
- $preboot->setGroupID("[".$preboot->getGroupID()."] ".$groupMapper->find($preboot->getGroupID())->getTitle());
- $preboot->setMembershipID("[".$preboot->getMembershipID()."] ".$personMapper->find($this->membershipMapper->find($preboot->getMembershipID())->getPersonID())->getFirstname());
}
}
diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php
index 1facf94..10bd53d 100644
--- a/application/modules/user/forms/Bootiso.php
+++ b/application/modules/user/forms/Bootiso.php
@@ -6,12 +6,8 @@ class user_Form_Bootiso extends Zend_Form
private $prebootlist;
private $groupdepth;
private $action;
- private $rights;
private $page;
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
}
@@ -30,7 +26,7 @@ class user_Form_Bootiso extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if ($this->rights == 'meta')
+ if (Pbs_Acl::checkRight('bem'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/forms/Bootmenu.php b/application/modules/user/forms/Bootmenu.php
index 1aaf808..081904f 100644
--- a/application/modules/user/forms/Bootmenu.php
+++ b/application/modules/user/forms/Bootmenu.php
@@ -3,12 +3,8 @@
class user_Form_Bootmenu extends Zend_Form
{
private $action;
- private $rights;
private $page;
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
@@ -27,7 +23,7 @@ class user_Form_Bootmenu extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if ($this->rights == "meta")
+ if (Pbs_Acl::checkRight('booeem'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/forms/BootmenuEntries.php b/application/modules/user/forms/BootmenuEntries.php
index c31668c..413b09a 100644
--- a/application/modules/user/forms/BootmenuEntries.php
+++ b/application/modules/user/forms/BootmenuEntries.php
@@ -6,7 +6,6 @@ class user_Form_BootmenuEntries extends Zend_Form
private $configlist;
private $maxorder;
private $action;
- private $rights;
private $page;
private $kcl;
@@ -14,9 +13,6 @@ class user_Form_BootmenuEntries extends Zend_Form
public function setKcl($kcl){
$this->kcl = $kcl;
}
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
@@ -55,7 +51,7 @@ class user_Form_BootmenuEntries extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if ($this->rights == "meta")
+ if (Pbs_Acl::checkRight('booeem'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php
index 867cfc1..21f674b 100644
--- a/application/modules/user/forms/Bootos.php
+++ b/application/modules/user/forms/Bootos.php
@@ -5,13 +5,9 @@ class user_Form_Bootos extends Zend_Form
private $configlist;
private $action;
- private $rights;
private $groupdepth;
private $page;
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
@@ -32,7 +28,7 @@ class user_Form_Bootos extends Zend_Form
$this->setName("BootOsCreate");
$this->setMethod('post');
- if ($this->rights == "meta")
+ if (Pbs_Acl::checkRight('boem'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/forms/Config.php b/application/modules/user/forms/Config.php
index bf25fe2..e9bbffb 100644
--- a/application/modules/user/forms/Config.php
+++ b/application/modules/user/forms/Config.php
@@ -4,12 +4,8 @@ class user_Form_Config extends Zend_Form
{
private $action;
- private $rights;
private $page;
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
}
@@ -22,7 +18,7 @@ class user_Form_Config extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if ($this->rights == 'meta')
+ if (Pbs_Acl::checkRight('cem'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/forms/Preboot.php b/application/modules/user/forms/Preboot.php
index 2b8ccff..8032a71 100644
--- a/application/modules/user/forms/Preboot.php
+++ b/application/modules/user/forms/Preboot.php
@@ -4,12 +4,8 @@ class user_Form_Preboot extends Zend_Form
{
private $action;
- private $rights;
private $page;
- public function setRights($rights){
- $this->rights = $rights;
- }
public function setAction($action){
$this->action = $action;
}
@@ -22,7 +18,7 @@ class user_Form_Preboot extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if ($this->rights == 'meta')
+ if (Pbs_Acl::checkRight('prem'))
$meta = true;
$this->addElement('text', 'title', array(
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml
index 23f7780..526edc0 100644
--- a/application/modules/user/views/scripts/bootiso/index.phtml
+++ b/application/modules/user/views/scripts/bootiso/index.phtml
@@ -9,10 +9,9 @@
<th>ID <span class='code'>bootosID</span></th>
<th>Title <span class='code'>title</span></th>
<th>GroupID <span class='code'>groupID</span></th>
- <th>MembershipID <span class='code'>membershipID</span></th>
<th>PrebootID <span class='code'>prebootID</span></th>
<th>Serialnumber <span class='code'>serialnumber</span></th>
- <th>Created <span class='code'>created</span></th>
+ <th>Changed <span class='code'>created</span></th>
<th>Expires <span class='code'>expires</span></th>
<th>Public <span class='code'>public</span></th>
<th colspan=3>Actions</th>
@@ -24,10 +23,9 @@
<td><?php echo $this->escape($bootiso->getID()); ?></td>
<td><?php echo $this->escape($bootiso->getTitle()); ?></td>
<td><?php echo $this->escape($bootiso->getGroupID()); ?></td>
- <td><?php echo $this->escape($bootiso->getMembershipID()); ?></td>
- <td><?php echo "[" . $this->escape($bootiso->getPrebootID()) . "] " . $this->prebootlist[$bootiso->getID()]; ?></td>
+ <td><?php echo $this->escape($bootiso->getPrebootID()); ?></td>
<td><?php echo $this->escape($bootiso->getSerialnumber()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootiso->getCreated())); ?></td>
+ <td><?php echo $this->escape($bootiso->getCreated()); ?></td>
<td><?php echo $this->escape($bootiso->getExpires()); ?></td>
<td><?php echo $this->escape($bootiso->getPublic()); ?></td>
<td class='action'><a href="<?php echo $this->url(
@@ -35,7 +33,6 @@
'module' => 'user',
'controller' => 'bootiso',
'action' => 'downloadbootiso',
- 'prebootID' => $bootiso->getprebootID(),
'bootisoID' => $bootiso->getID(),
'page' => $this->page
),
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml
index b580237..01842c1 100644
--- a/application/modules/user/views/scripts/bootmenu/index.phtml
+++ b/application/modules/user/views/scripts/bootmenu/index.phtml
@@ -18,7 +18,7 @@
<tr class=entry>
<td><?php echo $this->escape($bootmenu->getID()); ?></td>
<td><?php echo $this->escape($bootmenu->getTitle()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootmenu->getCreated())); ?></td>
+ <td><?php echo $this->escape($bootmenu->getCreated()); ?></td>
<td class='action'><a href="<?php echo $this->url(
array(
'module' => 'user',
@@ -65,7 +65,7 @@
<th>kcl</th>
<th>kclappend</th>
<th>Config</th>
- <th>Position</th>
+<!-- <th>Position</th>-->
<th colspan=2>Actions</th>
</tr>
@@ -89,9 +89,9 @@
<td><?php echo $this->escape($bootmenuentry->getBootosID()) ?></td>
<td><?php echo $this->escape($bootmenuentry->getKcl()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getKclappend()); ?></td>
- <td><?php echo $this->escape($bootmenuentry->getConfigID()) ?></td>
+ <td><?php echo $this->escape($bootmenuentry->getConfigID()) ?></td><!--
<td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td>
- <td class='action'><a href="<?php echo $this->url(
+ --><td class='action'><a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index a678cef..0ea8f77 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -14,7 +14,6 @@
<th>ID <span class='code'>bootosID</span></th>
<th>Title <span class='code'>title</span></th>
<th>GroupID <span class='code'>groupID</span></th>
- <th>MembershipID <span class='code'>membershipID</span></th>
<th>ConfigID <span class='code'>configID</span></th>
<th>Init <span class='code'>init</span></th>
<th>Kernel <span class='code'>kernel</span></th>
@@ -32,13 +31,12 @@
<td><?php echo $this->escape($bootos->getID()); ?></td>
<td><?php echo $this->escape($bootos->getTitle()); ?></td>
<td><?php echo $this->escape($bootos->getGroupID()); ?></td>
- <td><?php echo $this->escape($bootos->getMembershipID()); ?></td>
<td><?php echo $this->escape($bootos->getConfigID()); ?></td>
<td><?php echo $this->escape($bootos->getPath_init()); ?></td>
<td><?php echo $this->escape($bootos->getPath_kernel()); ?></td>
<td><?php echo $this->escape($bootos->getDefaultkcl()); ?></td>
<td><?php echo $this->escape($bootos->getDescription()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootos->getCreated())); ?></td>
+ <td><?php echo $this->escape($bootos->getCreated()); ?></td>
<td><?php echo $this->escape($bootos->getExpires()); ?></td>
<td><?php echo $this->escape($bootos->getPublic()); ?></td>
<?php if($this->update[$bootos->getID()]==true): ?>
diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml
index b651f63..0b62f7e 100644
--- a/application/modules/user/views/scripts/config/index.phtml
+++ b/application/modules/user/views/scripts/config/index.phtml
@@ -1,15 +1,18 @@
<h1>Config</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
+
<?php echo $this->formButton('createconfig', 'Create Config', array(
'onclick' => 'self.location="/user/config/createconfig/page/'.$this->page.'"',
'class' => 'addbutton'))?>
+
<table>
<tr>
+ <?php if(Pbs_Acl::checkRight('csai')): ?>
<th>ID <span class='code'>configID</span></th>
+ <?php endif; ?>
<th>Title <span class='code'>title</span></th>
- <th>GroupID <span class='code'>groupID</span></th>
<th>Shellscript <span class='code'>shellscript</span></th>
<th>Changed <span class='code'>created</span></th>
<th colspan=2>Actions</th>
@@ -18,9 +21,10 @@
echo "</table> There are no Config's to display." ?>
<?php foreach ($this->configlist as $config): ?>
<tr class=entry>
+ <?php if(Pbs_Acl::checkRight('csai')): ?>
<td><?php echo $this->escape($config->getID()); ?></td>
+ <?php endif; ?>
<td><?php echo $this->escape($config->getTitle()); ?></td>
- <td><?php echo $this->escape($config->getGroupID()); ?></td>
<td><?php echo $this->escape($config->getShellscript()); ?></td>
<td><?php echo $this->escape($config->getCreated()); ?></td>
<td class='action'><a href="<?php echo $this->url(
@@ -50,6 +54,7 @@
+
diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml
index 295f1ca..f1829e1 100644
--- a/application/modules/user/views/scripts/preboot/index.phtml
+++ b/application/modules/user/views/scripts/preboot/index.phtml
@@ -12,8 +12,6 @@
<tr>
<th>ID <span class='code'>prebootID</span></th>
<th>Title <span class='code'>title</span></th>
- <th>GroupID <span class='code'>groupID</span></th>
- <th>MembershipID <span class='code'>membershipID</span></th>
<th>Preboot Path <span class='code'>path_preboot</span></th>
<th colspan=3>Actions</th>
</tr>
@@ -22,9 +20,7 @@
<?php foreach ($this->prebootlist as $preboot): ?>
<tr class=entry>
<td><?php echo $this->escape($preboot->getID()); ?></td>
- <td><?php echo $this->escape($preboot->getTitle()); ?></td>
- <td><?php echo $this->escape($preboot->getGroupID()); ?></td>
- <td><?php echo $this->escape($preboot->getMembershipID()); ?></td>
+ <td><?php echo $this->escape($preboot->getTitle()); ?></td>
<td><?php echo $this->escape($preboot->getPath_preboot()); ?></td>
<?php if($this->update[$preboot->getID()]==true): ?>
<td class='action'><a href="<?php echo $this->url(