summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad2e305)
raw | patch | inline | side by side (parent: ad2e305)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Sep 2006 05:51:35 +0000 (05:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Sep 2006 05:51:35 +0000 (05:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4738 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_goVirusServer.inc | patch | blob | history | |
plugins/admin/systems/goVirusServer.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc
index 6335956b77b66de5c1cf303d6658c38a8f3b28e2..0dddfb24becf2f2f8a4adc0175fd2f3abe1c0ef3 100644 (file)
<?php
-class govirusserver extends plugin{
+require_once("class_goService.inc");
+
+class govirusserver extends goService{
/* This plugin only writes its objectClass */
var $objectclasses = array("goVirusServer");
var $dialog = NULL;
var $ui = NULL;
- var $acl = NULL;
var $Flags = array("D","S","A","E");
/* Get userinfo & acls */
$this->ui = get_userinfo();
- /* Set up the users ACL's for this 'dn' */
- $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
- $this->acl= get_module_permission($acl, "goVirusServer", $this->ui->dn);
-
/* Get Flags */
foreach($this->Flags as $flag){
$var = "avFlags".$flag;
function execute()
{
$smarty = get_smarty();
+
+ /* Set acls */
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translation) {
+ $smarty->assign($name."ACL",$this->getacl($name));
+ }
+
if(get_class($this->parent) == "servtabs"){
$smarty->assign("servtabs",TRUE);
/* Assign smarty vars */
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
- $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
/* Assign checkbox states */
foreach($this->Flags as $Flag){
$var = "avFlags".$Flag;
- $smarty->assign("avFlags".$Flag."ACL",chkacl($this->acl,$Flag));
if($this->$var){
$smarty->assign("avFlags".$Flag."CHK"," checked " );
}else{
}
}
- /* Return plugin informations for acl handling
+ /* Return plugin informations for acl handling */
function plInfo()
{
return (array(
"avHttpProxyURL" =>_("Http proxy URL"))
));
}
- */
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index 525ef543ffa4c4991e1c368f1265e5e30834a6e6..7df14ea2d431d7b6eebf3234ea0e8395b3cd1e90 100644 (file)
{t}Database user{/t}
</td>
<td>
- <input type='text' name='avUser' value='{$avUser}' {$avUserACL} style='width:220px;'>
+{render acl=$avUserACL}
+ <input type='text' name='avUser' value='{$avUser}' style='width:220px;'>
+{/render}
</td>
</tr>
<tr>
{t}Database mirror{/t}
</td>
<td>
- <input type='text' name='avDatabaseMirror' value='{$avDatabaseMirror}' {$avDatabaseMirrorACL} style='width:220px;'>
+{render acl=$avDatabaseMirrorACL}
+ <input type='text' name='avDatabaseMirror' value='{$avDatabaseMirror}' style='width:220px;'>
+{/render}
</td>
</tr>
<tr>
{t}Http proxy URL{/t}
</td>
<td>
- <input type='text' name='avHttpProxyURL' value='{$avHttpProxyURL}' {$avHttpProxyURLACL} style='width:220px;'>
+{render acl=$avHttpProxyURLACL}
+ <input type='text' name='avHttpProxyURL' value='{$avHttpProxyURL}' style='width:220px;'>
+{/render}
</td>
</tr>
<tr>
{t}Maximum threads{/t}
</td>
<td>
+{render acl=$avMaxThreadsACL}
<select name="avMaxThreads" title='{t}Select number of maximal threads{/t}'>
{html_options options=$ThreadValues selected=$avMaxThreads}
</select>
+{/render}
</td>
</tr>
</table>
{t}Max directory recursions{/t}
</td>
<td>
- <input type='text' name='avMaxDirectoryRecursions' value='{$avMaxDirectoryRecursions}' {$avMaxDirectoryRecursionsACL}>
+{render acl=$avMaxDirectoryRecursionsACL}
+ <input type='text' name='avMaxDirectoryRecursions' value='{$avMaxDirectoryRecursions}' >
+{/render}
</td>
</tr>
<tr>
{t}Checks per day{/t}
</td>
<td>
- <input type='text' name='avChecksPerDay' value='{$avChecksPerDay}' {$avChecksPerDayACL}>
+{render acl=$avChecksPerDayACL}
+ <input type='text' name='avChecksPerDay' value='{$avChecksPerDay}'>
+{/render}
</td>
</tr>
<tr>
<td colspan=2>
- <input type='checkbox' name='avFlagsD' {$avFlagsDACL} {$avFlagsDCHK} value='1'>
+{render acl=$avFlagsDACL}
+ <input type='checkbox' name='avFlagsD' {$avFlagsDCHK} value='1'>
+{/render}
{t}Enable debugging{/t}
</td>
</tr>
<tr>
<td colspan=2>
- <input type='checkbox' name='avFlagsS' {$avFlagsSACL} {$avFlagsSCHK} value='1'>
+{render acl=$avFlagsSACL}
+ <input type='checkbox' name='avFlagsS' {$avFlagsSCHK} value='1'>
+{/render}
{t}Enable mail scanning{/t}
</td>
</tr>
<table>
<tr>
<td>
- <input type='checkbox' name='avFlagsA' {$avFlagsAACL} {$avFlagsACHK} value='1'
+{render acl=$avFlagsAACL}
+ <input type='checkbox' name='avFlagsA' {$avFlagsACHK} value='1'
onClick=" changeState('avFlagsE') ;
changeState('avArchiveMaxFileSize') ;
changeState('avArchiveMaxRecursion') ;
changeState('avArchiveMaxCompressionRatio') ; "
>
+{/render}
{t}Enable scanning of archives{/t}
</td>
</tr>
<tr>
<td>
- <input type='checkbox' name='avFlagsE' {$avFlagsEACL} {$avFlagsECHK} {$avFlagsAState} value='1' id='avFlagsE'>
+{render acl=$avFlagsEACL}
+ <input type='checkbox' name='avFlagsE' {$avFlagsECHK} {$avFlagsAState} value='1' id='avFlagsE'>
+{/render}
{t}Block encrypted archives{/t}
</td>
</tr>
<td>{t}Maximum file size{/t}
</td>
<td>
- <input name='avArchiveMaxFileSize' id='avArchiveMaxFileSize' value='{$avArchiveMaxFileSize}' {$avFlagsAState} {$avArchiveMaxFileSizeACL} >
+{render acl=$avArchiveMaxFileSizeACL}
+ <input name='avArchiveMaxFileSize' id='avArchiveMaxFileSize' value='{$avArchiveMaxFileSize}' {$avFlagsAState} >
+{/render}
</td>
</tr>
<tr>
<td>{t}Maximum recursion{/t}
</td>
<td>
- <input name='avArchiveMaxRecursion' id='avArchiveMaxRecursion' value='{$avArchiveMaxRecursion}' {$avFlagsAState} {$avArchiveMaxRecursionACL} >
+{render acl=$avArchiveMaxRecursionACL}
+ <input name='avArchiveMaxRecursion' id='avArchiveMaxRecursion' value='{$avArchiveMaxRecursion}' {$avFlagsAState} >
+{/render}
</td>
</tr>
<tr>
<td>{t}Maximum compression ratio{/t}
</td>
<td>
- <input name='avArchiveMaxCompressionRatio' id='avArchiveMaxCompressionRatio' value='{$avArchiveMaxCompressionRatio}' {$avFlagsAState} {$avArchiveMaxCompressionRatioACL} >
+{render acl=$avArchiveMaxCompressionRatioACL}
+ <input name='avArchiveMaxCompressionRatio' id='avArchiveMaxCompressionRatio' value='{$avArchiveMaxCompressionRatio}' {$avFlagsAState}>
+{/render}
</td>
</tr>
</table>