summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a111c1c)
raw | patch | inline | side by side (parent: a111c1c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Apr 2008 08:34:09 +0000 (08:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Apr 2008 08:34:09 +0000 (08:34 +0000) |
-Added ACL checks to list actions
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10708 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10708 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiPackage.inc | patch | blob | history | |
gosa-plugins/fai/admin/fai/faiPackage.tpl | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 8681765774f3a44ff2e176da0405c8434128cdd5..b4dcfa82b3b7494e0f4e806e1749f7ac2d280539 100644 (file)
******/
if(!preg_match('/^freeze/', $this->FAIstate) && preg_match("/^remove_package_/",$name)){
$id = @base64_decode(preg_replace("/^remove_package_(.*)_[xy]*$/","\\1",$name));
-
if(isset($this->usedPackages[$id])){
- $this->usedPackages[$id];
+ unset($this->usedPackages[$id]);
}
break;
}
if(isset($this->list[$usedName]['DESCRIPTION'])){
$description = $this->list[$usedName]['DESCRIPTION'];
}
-
- $actions = "<input type='image' class='center' title='"._("Mark package for removal")."'
- src='images/negate.png' name='removal_package_".base64_encode($usedName)."' >";
- $actions.= " <input type='image' class='center' title='"._("Configure this package")."'
- src='images/package_configure.png' name='configure_package_".base64_encode($usedName)."' >";
- $actions.= " <input type='image' class='center' title='"._("Remove this package")."'
- src='images/lists/trash.png' name='remove_package_".base64_encode($usedName)."' >";
+
+ if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){
+ $actions = "<input type='image' class='center' title='"._("Mark package for removal")."'
+ src='images/negate.png' name='removal_package_".base64_encode($usedName)."' >";
+ }
+ if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIdebconfInfo")){
+ $actions.= " <input type='image' class='center' title='"._("Configure this package")."'
+ src='images/package_configure.png' name='configure_package_".base64_encode($usedName)."' >";
+ }
+ if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){
+ $actions.= " <input type='image' class='center' title='"._("Remove this package")."'
+ src='images/lists/trash.png' name='remove_package_".base64_encode($usedName)."' >";
+ }
$field1 = array("string" => $configured." ".$removal,"attach" => "style='width:40px;'");
$field2 = array("string" => $usedName ,"attach" => "style='width:200px;'");
index df3e5cfd2d7936adfdc5a5f484f7b2f8d8821ab0..c5bcd2d13947dc7fac78e9ddd0457e9adc9718fe 100644 (file)
<br>
{render acl=$FAIpackageACL}
<input type="submit" name="Addpkg" value="{msgPool type=addButton}">
-{/render}
-{render acl=$FAIpackageACL}
- <input type="submit" name="Delpkg" value="{t}Remove{/t}">
-{/render}
-{render acl=$FAIdebconfInfoACL}
- <input type="submit" name="Conpkg" value="{t}Configure{/t}">
-{/render}
-{render acl=$FAIpackageACL}
- <input type="submit" name="Markpkg" value="{t}Toggle remove flag{/t}">
{/render}
</td>
</tr>