From 8300dd67e48d56f31bc7726f51b4d886568c10cb Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 20 Sep 2006 05:51:35 +0000 Subject: [PATCH] Added initial av acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4738 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_goVirusServer.inc | 21 ++++---- plugins/admin/systems/goVirusServer.tpl | 50 ++++++++++++++----- 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc index 6335956b7..0dddfb24b 100644 --- a/plugins/admin/systems/class_goVirusServer.inc +++ b/plugins/admin/systems/class_goVirusServer.inc @@ -1,6 +1,8 @@ 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; @@ -65,6 +62,13 @@ class govirusserver extends plugin{ 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); @@ -94,13 +98,11 @@ class govirusserver extends plugin{ /* 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{ @@ -331,7 +333,7 @@ class govirusserver extends plugin{ } } - /* Return plugin informations for acl handling + /* Return plugin informations for acl handling */ function plInfo() { return (array( @@ -361,7 +363,6 @@ class govirusserver extends plugin{ "avHttpProxyURL" =>_("Http proxy URL")) )); } - */ } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/plugins/admin/systems/goVirusServer.tpl b/plugins/admin/systems/goVirusServer.tpl index 525ef543f..7df14ea2d 100644 --- a/plugins/admin/systems/goVirusServer.tpl +++ b/plugins/admin/systems/goVirusServer.tpl @@ -13,7 +13,9 @@ {t}Database user{/t} - +{render acl=$avUserACL} + +{/render} @@ -21,7 +23,9 @@ {t}Database mirror{/t} - +{render acl=$avDatabaseMirrorACL} + +{/render} @@ -29,7 +33,9 @@ {t}Http proxy URL{/t} - +{render acl=$avHttpProxyURLACL} + +{/render} @@ -37,9 +43,11 @@ {t}Maximum threads{/t} +{render acl=$avMaxThreadsACL} +{/render} @@ -53,7 +61,9 @@ {t}Max directory recursions{/t} - +{render acl=$avMaxDirectoryRecursionsACL} + +{/render} @@ -61,18 +71,24 @@ {t}Checks per day{/t} - +{render acl=$avChecksPerDayACL} + +{/render} - +{render acl=$avFlagsDACL} + +{/render} {t}Enable debugging{/t} - +{render acl=$avFlagsSACL} + +{/render} {t}Enable mail scanning{/t} @@ -90,18 +106,22 @@ @@ -114,21 +134,27 @@
- +{/render} {t}Enable scanning of archives{/t}
- +{render acl=$avFlagsEACL} + +{/render} {t}Block encrypted archives{/t}
{t}Maximum file size{/t} - +{render acl=$avArchiveMaxFileSizeACL} + +{/render}
{t}Maximum recursion{/t} - +{render acl=$avArchiveMaxRecursionACL} + +{/render}
{t}Maximum compression ratio{/t} - +{render acl=$avArchiveMaxCompressionRatioACL} + +{/render}
-- 2.30.2